code simplification - cl-yag - Common Lisp Yet Another website Generator HTML git clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/cl-yag/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 2c4804f37255ff1359dcadc138a713684f9b8898 DIR parent 550197c3e90895cd3177fb1dbf557d08e70f5e17 HTML Author: Solene Rapenne <solene@dataswamp.org> Date: Sat, 30 Apr 2016 18:12:28 +0200 code simplification Diffstat: M generator.lisp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) --- DIR diff --git a/generator.lisp b/generator.lisp @@ -61,20 +61,19 @@ is replaced with replacement." (loop for article in *articles* collect (create-article article :tiny t)))) -; produce index.html -(defun generate-file-index() - (save-file "index.html" - (generate-layout (generate-mainpage)))) - -; produce html files for articles -(defun generate-file-article(article) - (save-file (format nil "article-~d.html" (getf article :id)) - (generate-layout (create-article article :tiny nil)))) ; ENGINE START ! (defun generate-site() - (generate-file-index) - (dolist (article *articles*) (generate-file-article article)) + + ; produce index.html + (generate "index.html" + (generate-mainpage)) + + ; produce each article file + (dolist (article *articles*) + (generate (format nil "article-~d.html" (getf article :id)) + (create-article article :tiny nil))) + ;;(generate-file-rss) )