diff --git a/literate-build.org b/literate-build.org index 69967af..915fe0a 100644 --- a/literate-build.org +++ b/literate-build.org @@ -358,6 +358,8 @@ PROPS is used as an aid in getting the right information from the file." Finally the last function mushes it all together and actually generates an =index.org= file. I just looks through the =posts/= directory and finds any files that start with a date. It compares the last modification time of the =index.org= and that of the latest modified post, and skips generating if the =index.org= is newer. Then it takes the 30 latest posts and extracts the necessary information from them and writes it all into =index.org=. #+begin_src emacs-lisp +(require 'dash) + (defun publish-generate-index (props) "Generate an index from my posts. Argument PROPS @@ -380,7 +382,7 @@ Argument PROPS (insert "\n") (apply 'insert (mapcar (lambda (file) (publish-extract-summary-from-file file props)) - (take 30 (reverse files)))) + (-take 30 (reverse files)))) (write-file "posts/index.org")))))) #+end_src