Giter VIP home page Giter VIP logo

o-blog's Introduction

Warning

Please note at July 2nd 2014 o-blog has switch to version 2 which is compatible with version 1. Meanwhile you might experience some issues. You can still use o-blog 1 by using the o-blog-v1 branch instead of master.

Major change

Now o-blog supports several source files:

  • org-mode
  • markdown

Demo

Please have a look for a demo site and documentation:

o-blog's People

Contributors

d-p avatar exaos avatar myuhe avatar pharos-alexandria avatar punchagan avatar renard avatar swsnr avatar tarsius avatar tonyday567 avatar wujiang avatar zhengpd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

o-blog's Issues

Symbol's function definition is void: adoc-mode

I'm getting the following error when trying to publish the example blog: Symbol's function definition is void: adoc-mode. Here is the full log from *Messages* buffer:

OVERVIEW
Loading vc-git...
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
Exporting...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Symbol's function definition is void: adoc-mode

Here is what I did:

  1. cloned repository from GitHub
  2. edited .emacs according to the instructions
  3. opened ~/.emacs.d/o-blog/example/sample.org and typed M-x org-publish-blog

I understand that there is some problem with htmlize.el, but shouldn't it be readily available with org-mode and usable as-is?

I have the following versions of Emacs and org-mode:

  • GNU Emacs 24.0.94.1 (i386-apple-darwin11.3.0, NS apple-appkit-1138.32) of 2012-03-09 on Aldebaran.local
  • Org-mode version 7.8.03

Navigation bar Lisp errors, produced on some archive pages

I'm seeing a bug on some pages produced by the blog_index_category|month|year.html templated pages. Specifically, the links pointing to recent blog category posts within the Navigation snippet sometimes evaluate incorrectly to Lisp errors: the link will have something like,

Lisp error in nil: (error ob:post-htmlfile accessing a non-ob:post)

...while the anchor text looks like,

Lisp error in nil: (error ob:post-title accessing a non-ob:post)

You can see this live at the o-blog demo site, click on the dropdown navigation menu and look under Tips: http://renard.github.com/o-blog/tips/2012/08/index.html

On the o-blog demo site, not all archive pages are affected, only month-level. But on my local site, I'm seeing this error on category, year, and month archive pages.

style files duplicated

When I eval org-publish-blog, the content of style directory has always been copied to the PUBLISH_DIR. I thought it might be a bug.

sample.org gives error on publish

I have emacs24, Org-mode version 7.7 (release_7.7.286.gf075a.dirty).
When I follow the instructions and do M-x org-publish-blog I get the dreaded
wrong type argument: stringp, nil.
I dumped the trace by setting debug-on-error to t:

Debugger entered--Lisp error: (void-variable require)                                                                                        
  eval(require nil)                                                                                                                            eval-expression(require nil)                                                                                                               
  call-interactively(eval-expression nil nil)                                                                                                  recursive-edit()                                                                                                                           
  debug(error (wrong-type-argument stringp nil))                                                                                               string-match(nil "")                                                                                                                       
  byte-code("\304\211^X^Y\305\n^K\"\203A^@^H\204^U^@^K\306\211\224O^P   ^K\306\211\224O\307\310\225\205(^@\311\312\313\310^K\"\"\311\314\315$  org-html-handle-time-stamps("")                                                                                                            
  byte-code("^H\203^S^@\306     \n\"\203^S^@\307c\210\310 \210\311^P^H\203#^@\312\n!\313\261^B\210\314\315\311\"\210^K\203]^@\306\316\n\"\20$  org-export-as-html(nil nil nil string t)                                                                                                   
  (substring-no-properties (org-export-as-html nil nil nil (quote string) t))                                                                  (progn (insert string) (substring-no-properties (org-export-as-html nil nil nil (quote string) t)))                                        
  (unwind-protect (progn (insert string) (substring-no-properties (org-export-as-html nil nil nil (quote string) t))) (and (buffer-name temp$  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert string) (substring-no-properties (org-export-as-html nil nil $
  (with-current-buffer temp-buffer (unwind-protect (progn (insert string) (substring-no-properties (org-export-as-html nil nil nil (quote st$  (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (insert string) (substring-no$
  (with-temp-buffer (insert string) (substring-no-properties (org-export-as-html nil nil nil (quote string) t)))                               ob-export-string-to-html("#+OPTIONS: H:7 num:nil  toc:8 d:nil todo:nil <:nil pri:nil tags:nil\n\n\nA blog consists of org entries. Each en$
  (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to$  (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_"$
  (progn (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-str$  (if (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (progn (let* ((title (match-string-no-properties 4)) (tags (loop f$
  (when (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (let* ((title (match-string-no-properties 4)) (tags (loop for tn$  ob-parse-entry()                                                                                                                           
  (save-current-buffer (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (ob-parse-entry))                              (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))                                         
  (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)))                                    (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))                    
  (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)))))         (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-$
  (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nc$  (catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker ($
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var$  (block nil (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (set$
  (loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-$  (save-excursion (loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-positi$
  ob-parse-entries((#<marker at 20348 in sample.org> #<marker at 21507 in sample.org> #<marker at 22006 in sample.org> #<marker at 28380 in $  (let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (POSTS (ob-parse-entries $
  (save-current-buffer (set-buffer (or (get-file-buffer file) (find-file file))) (run-hooks (quote o-blog-before-publish-hook)) (let* ((star$  (with-current-buffer (or (get-file-buffer file) (find-file file)) (run-hooks (quote o-blog-before-publish-hook)) (let* ((start-time (curre$
  org-publish-blog-sync("/home/prasadch/.emacs.d/o-blog/example/sample.org")                                                                   (if async (org-publish-blog-async file) (org-publish-blog-sync file))                                                                      
  org-publish-blog("/home/prasadch/.emacs.d/o-blog/example/sample.org" nil)                                                                    call-interactively(org-publish-blog t nil)                                                                                                 
  execute-extended-command(nil)                                                                                                                call-interactively(execute-extended-command nil nil)        

Usage question

Hi,

We need to publish a library of about 1300 books (1 org-mode file per book), as a static site. Each book would have its own subdirectory, and each chapter its own page, linking to the proper book TOC, and the previous/next page. The total number of pages is more or less 120,000 pages.

As first attempt, we tried to use org-jekyll (by Jose Reyero, http://juanreyero.com/open/org-jekyll, after having tried other solutions, like org2jeklyll (https://github.com/yyr/org2jekyll etc.).

Right now, Emacs converts the pages to HTML files, and Octopress generates the static site.

We are not satisfied with this solution for many reasons, though, and we are still searching for a way to manage everything from Emacs (without having to learn ruby, liquid templating, etc).

I am going to try out o-blog in any case, for other sites as well, but I would like to ask if you feel it would be practical to use it also for our Library project, considering that site does not have a blog proper, but only a flat hierarchy of about 1300 sibling subdirectories?

How easy it would be to add custom features, like, for example:

  • previous/next links
  • a proper TOC for each book
  • an alphabetised index (divided by letter) for all the titles

Thank you so much for your excellent code!

Trying to publish sample-blog

While trying to publish the sample.org-file I get the message "timestamp delimiter start was not found" and the following warnings:

Warning (org): ???: Error evaluating (progn
= tags surrounds it.

#+begin_src html
<h1><lisp>(ob:blog-title BLOG)
): (invalid-read-syntax #)
Warning (org): ???: Error evaluating (progn

        (loop for p in (ob:get-posts nil 10)
              do (insert (format "<li><a href=\"%s/%s\">%s</a></li> "
                                 (ob:path-to-root)
                                 (ob:post-htmlfile p)
                                 (ob:post-title p))))

): (void-variable POSTS)
Warning (org): ???: Error evaluating (progn

        (progn
          ;; Get previous post
          (let ((ppost (ob:get-post-by-id (1+ (ob:post-id POST)))))
            (if ppost
                (insert (format "<li class=\"prev\"><a href=\"%s/%s\">%s</a></li>"
                                (ob:path-to-root)
                                (ob:post-htmlfile ppost)
                                (ob:post-title ppost)))
              (insert "<li>&nbsp;</li>")))
          ;; Get next post
          (let ((npost (ob:get-post-by-id (1- (ob:post-id POST)))))
            (if npost
                (insert (format "<li class=\"next\"><a href=\"%s/%s\">%s</a></li>"
                                (ob:path-to-root)
                                (ob:post-htmlfile npost)
                                (ob:post-title npost)))
              (insert "<li>&nbsp;</li>"))))

): (void-variable POST)
Warning (org): ???: Error evaluating (progn
(ob:post-content-html (ob:get-snippet "About"))
): (void-variable SNIPPETS)
Warning (org): ???: Error evaluating (progn
 (ob:format-date (ob:post-timestamp POST)) 
): (void-variable POST)
Warning (org): ???: Error evaluating (progn
 (ob:format-date (ob:post-timestamp POST) "%A %B, %d %Y at %H:%M:%S") 
): (void-variable POST)

In the out-directory there are no blog posts and the menu says: "Lisp error in nil: (error ob:post-title accessing a non-ob:post)"

Whats going wrong? Thanks for any help!

FTP publishing

Hi,

I love o-blog - thanks for your hard work! Being able to blog from org-mode may get me to actually start blogging consistently.

So I am having trouble with publishing via FTP, which is the only option on my current web host. I can publish via SSH/SFTP fine to hosts where I have an SSH account, but my web host only lets me use FTP (I know, right?)

I can browse the files on the server, create new files and edit files using Emacs with Tramp just fine.

When I try to publish from o-blog using this:

#+PUBLISH_DIR: /ftp:[email protected]:/html/blog

I get this error:

byte-code: Cannot make directory /ftp:[email protected]:/html/blog/: file already exists

If I delete that directory from the server, it gets further, but then later gives the same message. I suspect that what is going on here is that o-blog is trying to create the directory with some option that creates it only if it doesn't exist, like "mkdir -p" would, and that tramps with ftp doesn't support that option.

Any advice appreciated,
Matthew

Blogs in multiple files

At now, all blogs store in a single file. I want to split them into different files (e.g. blog-2011.org, blog-2012.org, blog-computer.org), and all outputs into one site. If I do org-publish-blog in one file, it will only update tags and Tips in the output directory. Is it possible?

DATE timestamp issues

Timestamps using ob:get-header "DATE" were working, but now produce Lisp error in nil: (wrong-type-argument integerp nil) as of the most recent commits.

Support for Post Excerpts

It would be nice if there was support for excerpts of blog posts. This could either be defined as an org CATEGORY, or perhaps the first paragraph of a blog post. This would be useful for building a front page with say the latest five posts to give the reader some idea of the post content.

add a template directory

right now , the o-blog read the template files from templates directory , and shells update is based the templates , might be better to create a directory for example default for the default template of o-blog , then if some body want to customize or create a new theme , just create new folder call my-theme ??

Lisp error in nil: non-ob:post

I try to translate the sample page into Chinese. The navigation bar is blank, and an error is in "index.html":
`


Lisp error in nil: (error ob:post-content-html accessing a non-ob:post)

` My test: https://github.com/exaos/o-blog/tree/gh-pages

About "new name for the project" (as seen in Roadmap)

Hi,

browsing your nice code I found 555691f Find another name for the project such as.... I am following your invitation to submit some ideas. I personally like short names. To me, o-blog is an emacs tool to help manage and publish sites. Since your application is done in elisp, and based on Emacs, possibly the name could refer to that, perhaps as el-site, el-sitemanage, el-sitepublish or el-sitepress.

Support for isolated files and TOC in blog posts

Hi Sir,

I am very impressed with your work and really excited to start using o-blog. Hopefully when I am well-versed in elisp I can contribute some help.

As of right now, I find many of my posts in org-mode are tutorials or references, and so it would be of great value to me to have a table of contents on these pages, which tend to be quite long at times. As an example, http://emacsclub.github.com/html/emacs_intro.html

Is it possible to create blog posts that are linked to separate org-files, and then be able to generate a TOC on those pages?

Thank you,
Mish

Sentence put at the top of the index.html

Hi,

I tried your "bug report" process, but any buffer appears. So here is what I see if I open the index.html file (line 15).

* Lisp error in nil: (void-variable org-export-xhtml-scripts)*

I installed emacs-goodies-el in my Xubuntu distribution. Can you tell me what I forgot?

Thanks in advance!

Basile

#+O_BLOG_SOURCE can't auto detect buffer mode

file: o-blog-source.el
fun: o-blog-publish-source

         (with-temp-buffer
           (insert-file-contents src-file)
           (if mode
               (let ((func (intern (format "%s-mode" mode))))
                 (if (functionp func)
                 (funcall func)
                   (warn (concat "Mode %s not found for %s. "
                         "Consider installing it. "
                         "No syntax highlight would be bone this time.")
                     mode src-file)))
             (set-auto-mode))

This can not auto detect the major of src-file, may be you can add this:

               (or mode
                   (setq mode (assoc-default src-file auto-mode-alist
                                             'string-match)))
               (funcall mode)

Lisp error in nil: (void-function htmlize-protect-string)

I tried my Chinese blog using o-blog and got many errors: Lisp error in nil: (void-function htmlize-protect-string)
Please see debug info here (you can ignore the Chinese content :-) ):
http://exaos.github.com/debug.html
The source file is here:
https://github.com/exaos/el-orgsite/blob/master/gh-blog.org

I searched and found the error was from htmlize.el included in org-mode package. How to solve such a problem while export blogs using non-ASCII characters?

Getting (wrong-type-argument characterp nil)

Hi!
Trying out o-blog for the first time. I followed the manual installation, and got an error ((wrong-type-argument characterp nil)) when publishing the sample. I trimmed down my init file to

(add-to-list 'load-path "~/local/site-lisp/")
(add-to-list 'load-path "~/local/site-lisp/org/lisp/")
(add-to-list 'load-path "~/local/site-lisp/org/contrib/lisp/")
(add-to-list 'load-path "~/local/site-lisp/remember/")
(add-to-list 'load-path "~/.emacs.d/o-blog")

(require 'o-blog)

(require 'org-install)
(require 'org-protocol)

Started emacs with -q -l . Opened sample.org and ran M-x org-publish-blog. Here's the trace.

Debugger entered--Lisp error: (wrong-type-argument characterp nil)
  char-to-string(nil)
  (downcase (char-to-string (car ...)))
  (list (downcase (char-to-string ...)))
  (nconc ret (list (downcase ...)))
  (setq ret (nconc ret (list ...)))
  (progn (setq ret (nconc ret ...)))
  (if (or (member gc ...) (= 45 c)) (progn (setq ret ...)) (if (member gc ...) (progn ...)))
  (while (< (setq --cl-idx-- ...) (length --cl-vec--)) (setq c (aref --cl-vec-- --cl-idx--)) (setf gc (get-char-code-property c ...)) (if (or ... ...) (progn ...) (if ... ...)))
  (let* ((--cl-vec-- s) (--cl-idx-- -1) (c nil) (gc nil) (ret nil) (ret nil)) (while (< ... ...) (setq c ...) (setf gc ...) (if ... ... ...)) (replace-regexp-in-string "--+" "-" (replace-regexp-in-string "^-+\\|-+$" "" ...)))
  (catch (quote --cl-block-nil--) (let* (... ... ... ... ... ...) (while ... ... ... ...) (replace-regexp-in-string "--+" "-" ...)))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
  (block nil (let* (... ... ... ... ... ...) (while ... ... ... ...) (replace-regexp-in-string "--+" "-" ...)))
  (loop for c across s with gc with ret do (setf gc (get-char-code-property c ...)) if (or (member gc ...) (= 45 c)) collect (downcase (char-to-string ...)) into ret else if (member gc (quote ...)) collect "-" into ret finally return (replace-regexp-in-string "--+" "-" (replace-regexp-in-string "^-+\\|-+$" "" ...)))
  ob:sanitize-string("usage")
  (make-ob:tags :name td :safe (ob:sanitize-string td))
  (cons (make-ob:tags :name td :safe (ob:sanitize-string td)) --cl-var--)
  (setq --cl-var-- (cons (make-ob:tags :name td :safe ...) --cl-var--))
  (push (make-ob:tags :name td :safe (ob:sanitize-string td)) --cl-var--)
  (while (consp --cl-var--) (setq tn (car --cl-var--)) (setf td (replace-regexp-in-string "_" " " ...)) (push (make-ob:tags :name td :safe ...) --cl-var--) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- ...) (tn nil) (td nil) (--cl-var-- nil)) (while (consp --cl-var--) (setq tn ...) (setf td ...) (push ... --cl-var--) (setq --cl-var-- ...)) (nreverse --cl-var--))
  (catch (quote --cl-block-nil--) (let* (... ... ... ...) (while ... ... ... ... ...) (nreverse --cl-var--)))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
  (block nil (let* (... ... ... ...) (while ... ... ... ... ...) (nreverse --cl-var--)))
  (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " ...)) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))
  (let* ((title ...) (tags ...) (timestamp ...) (year ...) (month ...) (day ...) (category ...) (page ...) (filename ...) (filepath ...) (htmlfile ...) (content ...) (linked-files ...)) (when page (setq htmlfile page filename ... filepath ...)) (loop for f in linked-files do (let ... ... ...)) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or ... ...) :content content :content-html (ob-export-string-to-html content) :category category))
  (progn (let* (... ... ... ... ... ... ... ... ... ... ... ... ...) (when page ...) (loop for f in linked-files do ...) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root ... :htmlfile htmlfile :template ... :content content :content-html ... :category category)))
  (if (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (progn (let* ... ... ... ...)))
  (when (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (let* (... ... ... ... ... ... ... ... ... ... ... ... ...) (when page ...) (loop for f in linked-files do ...) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root ... :htmlfile htmlfile :template ... :content content :content-html ... :category category)))
  ob-parse-entry()
  (save-current-buffer (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (ob-parse-entry))
  (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))
  (list (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry)))
  (nconc posts (list (with-current-buffer ... ... ...)))
  (setq posts (nconc posts (list ...)))
  (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts ...)) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker ...) (setq posts ...) (setq --cl-var-- ...)) (loop for post in (sort posts ...) with id = 0 do (setf ... id) and do (incf id 1) and collect post))
  (catch (quote --cl-block-nil--) (let* (... ... ... ...) (while ... ... ... ...) (loop for post in ... with id = 0 do ... and do ... and collect post)))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ... ... ...)))
  (block nil (let* (... ... ... ...) (while ... ... ... ...) (loop for post in ... with id = 0 do ... and do ... and collect post)))
  (loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry)) into posts finally return (loop for post in (sort posts ...) with id = 0 do (setf ... id) and do (incf id 1) and collect post))
  (save-excursion (loop for marker in markers with posts = nil collect (with-current-buffer ... ... ...) into posts finally return (loop for post in ... with id = 0 do ... and do ... and collect post)))
  ob-parse-entries((#<marker at 16762 in sample.org> #<marker at 17933 in sample.org> #<marker at 18432 in sample.org> #<marker at 24735 in sample.org> #<marker at 25495 in sample.org>))
  (let* ((start-time ...) (default-directory ...) (BLOG ...) (POSTS ...) (ALL-POSTS POSTS) (STATIC ...) (SNIPPETS ...) (TAGS ...)) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory (format "%s/%s" ... ...) (ob:blog-publish-dir BLOG)) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file ...)))
  (save-current-buffer (set-buffer (or ... ...)) (run-hooks (quote o-blog-before-publish-hook)) (let* (... ... ... ... ... ... ... ...) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory ... ...) (run-hooks ...) (message ...)))
  (with-current-buffer (or (get-file-buffer file) (find-file file)) (run-hooks (quote o-blog-before-publish-hook)) (let* (... ... ... ... ... ... ... ...) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (copy-directory ... ...) (run-hooks ...) (message ...)))
  org-publish-blog-sync("/home/paul/.emacs.d/o-blog/example/sample.org")
  (if async (org-publish-blog-async file) (org-publish-blog-sync file))
  org-publish-blog("/home/paul/.emacs.d/o-blog/example/sample.org" nil)
  eval((org-publish-blog "/home/paul/.emacs.d/o-blog/example/sample.org" nil))
  repeat-complex-command(1)
  call-interactively(repeat-complex-command nil nil)

Please help!

or: Symbol's function definition is void: org-export-as




**Configuration**

* Emacs

GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
of 2013-03-11 on safran


* Org-mode

8.0-pre


* o-blog

753dfbb o-blog (1.2-133-g753dfbb)
-ee55c859d23af4a3d4825610815ed5926c417101 Font-Awesome
-320b75de63f347027774ba7353eea7f6937ab14b bootstrap
-bd8679b4c6e1e05d81c5b9c8a3f85d6fafde9ebe less.js

Generating HTML output is broken?

I've followed the instruction from the home page (i.e. I've opened sample.org file and executed org-publish-blog command), but no html files have been generated (only a tips directory which contains two png images in subdirectories).

I use Emacs 24 on Ubuntu 12.04. O-blog has been fetched using el-get.

The command output is listed below (the last message suggests that something is wrong..):

OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [2 times]
htmlize.el 1.34 or later is needed for source code formatting [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [2 times]
htmlize.el 1.34 or later is needed for source code formatting [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [3 times]
htmlize.el 1.34 or later is needed for source code formatting [3 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [9 times]
htmlize.el 1.34 or later is needed for source code formatting [9 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [2 times]
htmlize.el 1.34 or later is needed for source code formatting [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing... [3 times]
htmlize.el 1.34 or later is needed for source code formatting [3 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW [4 times]
Exporting... [2 times]
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Exporting...
org-babel-exp processing... [2 times]
htmlize.el 1.34 or later is needed for source code formatting [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW [2 times]
Exporting...
org-babel-exp processing...
htmlize.el 1.34 or later is needed for source code formatting
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
o-blog-publish-source: Symbol's function definition is void: htmlize-region-for-paste

ob:blog-style-dir seems not used when generating

I followed the README and generated out/ from sample.org.

The problem is that folders like js/, less/ are not put under style/.

I'm using emacs 23.2, maybe it's the difference in copy-directory?

Errant behavior with latest posts on category index

I currently have code in page_footer.html that adds a sidebar to every page. As part of that sidebar is a listing of the 12 most recent articles. This works very well, except when you visit a category index page. Instead of showing the most recent articles for the entire site, the most recent articles from that category are shown. Is there a way to get this to show the most recent articles for the entire site (all categories) even on a category index page?

Here is the code in question:

<h4>Current Issue</h4>
<ul>
<lisp>
  (loop for p in (ob:get-posts nil 12)
  do (insert (format "<li><a href=\"%s/%s\">%s</a></li> "
  (ob:path-to-root)
  (ob:post-htmlfile p)
  (ob:post-title p)
  )))
</lisp>
</ul>

Can't find library org

Installed o-blog manually, opened the sample.org and ran 'org-publish-blog'.

This results in a "Can't find library org" message.

I'm using Emacs 24.0.97.1 and org-mode 7.8.10

Lisp error in nil: (void-function ob:post-language)

I try to re-generate zh-example pages, but the index file contains errors:

<html lang="Lisp error in nil: (void-function ob:post-language)">
...
      <div class="nav-collapse">
        Lisp error in nil: (error ob:post-content-html accessing a non-ob:post)

Generate blog URL in QRcode

Is it easy to add the URL QR image align the header while generating a post file? I like such a feature. :-)
The implementation may be just adding a line to the template file like

http://www.the-qrcode-generator.com/api/download?size=200&text=<lisp>.....</lisp>

e.g.

http://exaos.github.com

INCLUDING Blog Posts

I want to port my Jekyll powered bog to o-blog. I have a lot of posts, one file for post. I would like to avoid placing them in one big file, as I think it would probably end up growing too big to be manageable.

I was hoping to INCLUDE each file:

+INCLUDE: "./posts/2012-09-06-sea-to-summit-xmug.org"

File contains:

** DONE Sea to Summit X-Mug. :o@blog:
CLOSED: [2012-10-18 Thu]

I managed to crack my plastic mug and was about to buy another one
when I decided to investigate the alternatives. I don't like metal
mugs of any sort. I end up burning my finger and lips whenever I use

However, it appears that the TODO header doesn't get processed. If I do it like this in the sample.org file:

** DONE Sea to Summit X-Mug. :o@blog:
CLOSED: [2012-10-18 Thu]

+INCLUDE: "./posts/2012-09-06-sea-to-summit-xmug.org"

Where the include just contains the body text it works. I guess I can live with having all the headers and just including the body text, but is it possible to get o-blog to process the DONE section in an included file?

Lisp error in nil: (error ob:post-content-html accessing a non-ob:post) when creating blog

I tried working through the tutorial and starting a new blog. When I publish it I get a lisp error and things don't come out as they should. Here's the org file I am using.

#+TITLE: chatr
#+DESCRIPTION: Tastes great, doesn't leave a bruise!
#+DATE: 2012-09-29 19:02:33

#+STARTUP: logdone

#+URL: http://aaronbedra.com

* DONE First Post
  CLOSED: [2012-09-29 Sat 20:56]
  :PROPERTIES:
  :tags: Test
  :END:

This is the first test post. Some cool stuff should probably go in here.

* DONE Second Post
  CLOSED: [2012-09-29 Sat 20:56]
  :PROPERTIES:
  :tags: Test
  :END:

This is the second test post. Some cool stuff should probably go in here.

Post "CUSTOM_ID" property

Default org properties have "CUSTOM_ID" option, which can be used as internal references. Again, I want the post filename can use this property value, e.g. the post filename can be "blog/2012/04/01_computer-OCD-users.html" while its "CUSTOM_ID" is "computer-OCD-users" no matter what its tile is. If posts refer to each other, I can use "CUSTOM_ID" as link to each other. So, post filename may be based on "CUSTOM_ID" > "#+FILENAME_SANITIZER" > "ob-sanitize-string".
PROS

  • post URL can be fixed while the title changes slightly.
  • references between post are simple

customization questions.

My elisp skills are very limited. I could understand what is going on. but could n't figure out customizations aspects.
This may not be the right place to ask, I have few questions, might be FAQ. Please redirect me discussion page/mailing list (if there is one)

how to split the o-blog directory from my site repository.?

Suppose my installation is in =/.emacs.d/el-get/o-blog/= and I want
to put my blog post/pages in =
/blog= how to configure it to be able
to use styles and all goodies from o-blog.

how to split pages into multiple directories and file.?

Example =sample.org= is nice. I understand that many pages/indexes are
generated from =sample.org=. But how can I organize my site something
like the following?

site/
  -> blog/
       -> first-blog-post.org
       -> second-blog-post.org
  -> proj/
      -> project-structure.org
      -> project-howto.org

will become

site/
  -> blog/
       -> index.html
       -> first-blog-post.html
       -> second-blog-post.html
  -> archive/
  -> category/
  -> proj/
      -> index.html
      -> project-structure.html
      -> project-howto.html

how to stop regenerating everything again.?

Just like =org-publish-timestamp-directory=. only new posts/pages
would be regenerate not all (ofcourse with respecting DONE or whatever
todo tag).

how to publish site in batch mode.?

Thanks
sorry for asking such a long/verbal questionnaire

Export broken: Invalid face

I installed as documented and then tried to org-publish-blog sample.org. I got "Invalid face" from the htmlize library (see backtrace below).

Org-version: 7.8.11
htmlize: 1.34
Emacs: 24.2.1

Debugger entered--Lisp error: (error "Invalid face")
internal-get-lisp-face-attribute(nil :height nil)
face-attribute(nil :height)
htmlize-face-size(default)
htmlize-face-to-fstruct(default)
htmlize-make-face-map((default))
htmlize-buffer-1()
htmlize-region(1 62)
org-export-htmlize-region-for-paste(1 62)
org-export-format-source-code-or-example("bash" "cd ~/.emacs.d\ngit clone https://github.com/renard/o-blog.git\n" " " 0 nil)
org-export-replace-src-segments-and-examples()
org-export-preprocess-string("#+OPTIONS: H:7 num:nil toc:nil d:nil todo:nil <:nil pri:nil ...
[snip]

Lisp error in nil: (error Expected a loop keyword, found c-collect-line-comments)

The excerpt feature is causing this error. I still can't get any meaningful output. This is the last remaining issue. After this is fixed, I promise not to bother you with these constant requests.

o-blog is amazing. After using Wordpress seemingly since the dawn of time, then Jekyll for a couple of years, this is like a spring breeze after a long, cold winter. Thank you for this program, and thank you even more for your generosity in adding features and fixing bugs.

Suggestions / Questions

Thank you for your work on o-blog. I am currently working on modifying o-blog to make it into a system capable of managing an online, open-access journal. I am currently using a combination of Org export and Jekyll, but discovered o-bog, which allowed me to create most of the functionality I needed. I do have a few things that I can't seem to get working. I would greatly appreciate your help with those few things. Since this will be a real-world application of o-blog, fixing these issues may be advantageous for others as well.

  1. Currently I can make long tags by using _ which creates safe urls and but presents as a space. I really need a similar functionality for categories. Is there any way to make multi-word categories that export in a safe/sanitized manner such as volume_1_issue_2, but display as something like "Volume 1 Issue 2"?
  2. Is there any way to use categories and tags together?

In Jekyll, I am using the following code, but can't seem to do something similar with o-blog:

<nav>
    <h2>Number {{page.issue | capitalize}}</h2>
    <h3>{{page.volume}}</h3>
    {% for category in site.categories %}
        <h3>{{category[0]}}</h3>
    {% for post in category[1] %}
    {% if post.issue == page.issue %}
    <ul>
        <li><a href="{{post.url}}" title="{{post.title | escape}}" rel="bookmark">{{post.title}}</a><br/><span>{{post.author}}</span></li>
    </ul>
    {% else %}
    {% endif %}
    {% endfor %}
    {% endfor %}
</nav>

Basically, what I am trying to do is limit posts to the current category / issue, say One for example and then go through all tags for articles in that issue and display first the tag, then the articles associated with that tag.

Ex:

  • Issue 1
    • Articles
      • article a
      • article b
    • Editorials
      • article c
  1. Is there any way to get automatic excerpts? I managed to get manual excerpts working with o-blog, but automatic sanitized excerpts of say 300 characters could be useful for Atom feeds.
  2. Automatic Sitemap generation. I can get this working partially, but only for posts. How can I make the sitemap contain all posts, static pages, category indexes,...?
  3. I currently have a menu that shows in a side bar on all pages. When I use tags, everything just works, but if I have a sidebar with categories, weird things happen, mainly that all categories show on most pages, but on a category page only the category for that page shows up. Is there any way to have the list of category links and titles to show all the time, even on a category page?
  4. In Jekyll, I can have highlighted menu items automatically without any javascript by using code such as follows:

{% assign activemenu = page.bodyclass %}



    {% case page.bodyclass %}
    {% when 'home' %}
  • HOME

  • {% else %}
  • HOME

  • {% endcase %}
    {% for section in site.sections %}

  • <a href="/{{section}}/" {% if section == activemenu %} class="current" {% endif %} title="{{section | capitalize}}" rel="section" accesskey="{% cycle 2,3,4,5,6,7,8,9 %}">{{section | upcase }}

  • {% endfor %}
    ...

    Is there any way to assign body classes dynamically in o-blog like I do above using liquid and Jekyll?


    Thank you for any and all help you can provide. If I can get even one or a few of these working it would really make my day. If all of these issues could be fixed, org + o-blog + some custom LaTeX templates would really make an ideal publishing platform.

    FYI, you can find my o-blog modifications here: https://github.com/fravashi/o-journal , and my site source (not live yet) using o-blog here: https://github.com/fravashi/Luvah.

    Best,

    Farasha

latex export with o-blog

Hi

I've recently tried using your o-blog software and I was wondering whether it was possible to export latex fragments to html using dvipng instead of the default MathJax mechanism. I've tried putting "#+OPTIONS: LaTeX:dvipng" into the source file of my blog, and I've also tried putting (setq org-export-with-LaTeX-fragments (quote dvipng)) inside the (ob-export-string-to-html) function in o-blog.el but it does not produce any images. I'm a novice at org-mode so these attempts may have been fairly naive.

Also, I hope that this is the right forum to ask questions of this kind, and you have my apologies if its not the case.

Thanks

Stephen

Including class in an exported list

Hi o-bloggers,

I'm in the process of cleaning up oblog-min.org (or should it be called o-blog-min.org?).

Does anyone know how to add a class to a list on html export. So, this:

+BEGIN_EXAMPLE

  • [[#][Home]]
  • [[#about][About]]
  • [[#contact][Contact]]
    #+END_EXAMPLE

becomes this:

+BEGIN_EXAMPLE

# +END_EXAMPLE

I've been back and forth through the docs and I can't place a way to
do it, other than to drop back to raw html (and I love my plain
lists).

Any help appreciated. Also posted on the org mailing list.

tony

Where should custom functions go?

In order to customize some important aspects of posts, like the URL, it's necessary to have custom functions; where should such functions be defined? Hope this isn't RTFM, but I couldn't find directions on this, even the lengthy customization discussion in #24 didn't mention where custom functions should go.

I'd rather not "pollute" the main o-blog.el file with such customization, so perhaps the solution is a file like o-blog-custom.el that will be pulled in via require. Or is there a better way?

Problems creating simple blog

Hi!

First of all, o-blog looks awesome! I'm trying to learn it to use it for my blog. I can successfully publish the sample.org blog, but I have a bit of trouble when I try to write something myself. In particular, I tried using the minimal example from:
http://renard.github.com/o-blog/Tips/2012/01/07_creating-a-blog.html

I find that at the top-level (out/), there's no index.html (there is an index.xml though). There is an index.html e.g. in out/Blog, but it contains error messages such as:
Lisp error in nil: (error ob:post-content-html accessing a non-ob:post)

Is there anything obvious that I am doing wrong? Thanks!

option to change post filenames

At now, the post filenames are generated by sanitizing titles. But if the title is not in English or any non-Latin characters, it will be failed to get the proper names. How about adding an option to change the default post filenames?
The default post filenames may be generated by using a MD5SUM instead of sanitized titles. User can change the default way by option.

ob-bootstrap-alert-conotations void variable...

in org-html-handle-links

I've downloaded a new el-get version to make sure I have the latest code.

Here's the output of the *Messages buffer:

...
org-babel-exp processing... [2 times]
Exporting...
HTML export done, pushed to kill ring and clipboard
OVERVIEW
Mark set
OVERVIEW
Exporting...
org-babel-exp processing... [6 times]
Exporting...
org-html-handle-links: Symbol's value as variable is void: ob-bootstrap-alert-conotations

...

More sophisticated category index

I managed to get what I wanted regarding the category index template. My code is here https://gist.github.com/2997690. This shows shows a tag then all posts that are in both that tag and the current category. It is very useful for a journal. If you like, I can update it a bit and send you a pull request.

Static Glyphicons

So, I like o-blog quite a bit, and have decided to use it for http://alpha.common-lisp.net/ ... but I did not want to use the .less and the .js, so changed the template(s) to something like :

<lisp>
          (drewc.org:replace-<i>-icons
           (replace-regexp-in-string (rx "<ul>")
            "<ul class=\"nav\">"
            (ob:post-content-html (ob:get-snippet "Navigation"))))
</lisp>

And here is the code. It is not-so-great, but works fine :)

(defun drewc.org:replace-<i>-icons (string)
  (let* ((re-icon (rx
                   "\<i\>"
                   (submatch
                    (and "icon-"
                         (one-or-more (or alphabetic (any "  -")))))
                   "\</i\>"))
         (match (string-match re-icon string))
         (all (drewc.org:match-strings-all string))
         (class (second (and match all )))
         (future (and match (substring string (+ 1 match))))
         (next (when future (string-match re-icon future)))
         (string-to-replace (if next
                                (substring string 0 (+ match (length (first all))))
                              string))

         (next-string (if next
                          (substring string (length string-to-replace))
                        "")))
    (if class
        (concatenate
         'string
         (replace-regexp-in-string
          re-icon
          (concatenate 'string "<i class=\"" class "\"></i>")
          string-to-replace)
         (if next (drewc.org:replace-<i>-icons next-string) "")
         )
      string-to-replace)))

Let me know if that can be included or what has to be done to make it so.

-- drewc

static assets directory copy

right now , the o-blog does support the style directory copy to publish dir, what if I have a assets directory which container some blog images or videos, yes , I can put this foder in to templates/style/. but if :

.
├── assets
│   ├── img
│   └── videos
├── blog.org
└── themes
    ├── my-theme
    └── o-blog
        └── style

should be better , then we can extract themes and share.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.