Commits

Anonymous committed f9e5167

Fix archive generation (close #57).

Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>

  • Participants
  • Parent commits e7ec207

Comments (0)

Files changed (3)

File example/sample.org

 #+TITLE: o-blog
 #-DESCRIPTION: A stand-alone blogging system for Org-mode.
-#+DATE: 2012-08-21 11:02:33
+#+DATE: 2012-11-20 11:57:02
 
 #+STARTUP: logdone
 
 
   - [[file:{lisp}(ob:path-to-root){/lisp}/index.html][/icon-home icon-white/ {lisp}(ob:gettext :home){/lisp}]]
 
-  - [[file:{lisp}(let ((POSTS ALL-POSTS)) (format "%s/%s" (ob:path-to-root) (ob:post-htmlfile (ob:get-last-post "Tips")))){/lisp}][/icon-file icon-white/ Tips]]
+  - [[file:{lisp}(format "%s/%s" (ob:path-to-root) (ob:post-htmlfile (ob:get-last-post "Tips"))){/lisp}][/icon-file icon-white/ Tips]]
 
   - [[file:{lisp}(ob:path-to-root){/lisp}/tags.html][/icon-tags icon-white/ Tags]]
 
 ;; Author: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
 ;; Keywords: emacs,
 ;; Created: 2012-01-04
-;; Last changed: 2012-08-21 11:44:41
+;; Last changed: 2012-11-20 11:55:30
 ;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
 
 ;; This file is NOT part of GNU Emacs.
 
 (defun ob:get-last-post (&optional category nth)
   "Get the NTH last post in from CATEGORY or \"blog\" if not defined."
-  (let ((POST ALL-POSTS)
+  (let ((POSTS ALL-POSTS)
 	(nth (or nth 0)))
     (nth nth (ob:get-posts (lambda (x)
 			     (equal (or category "blog")

File templates/page_footer.html

 	      <h1><a href="<lisp>(ob:path-to-root)</lisp>/archives.html"><lisp>(ob:gettext :archives)</lisp></a></h1>
 	      <ul>
 		<lisp>
-		  (loop for p in (ob:get-posts nil 10)
+		  (loop for p in (let ((POSTS ALL-POSTS)) (ob:get-posts nil 10))
 		  do (insert (format "<li><a href=\"%s/%s\">%s</a></li> "
 		  (ob:path-to-root)
 		  (ob:post-htmlfile p)