ifixed error if no tag supplied, customize title of page with article's name - cl-yag - Common Lisp Yet Another website Generator Err bitreich.org 70 hgit clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/cl-yag/ URL:git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/cl-yag/ bitreich.org 70 1Log /scm/cl-yag/log.gph bitreich.org 70 1Files /scm/cl-yag/files.gph bitreich.org 70 1Refs /scm/cl-yag/refs.gph bitreich.org 70 1Tags /scm/cl-yag/tag bitreich.org 70 1README /scm/cl-yag/file/README.md.gph bitreich.org 70 1LICENSE /scm/cl-yag/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 7682a4620e7aa93fabcd996fe7450e8f67bf7f37 /scm/cl-yag/commit/7682a4620e7aa93fabcd996fe7450e8f67bf7f37.gph bitreich.org 70 1parent 94f67f290121a55da02ca3440e4ec4899622bc78 /scm/cl-yag/commit/94f67f290121a55da02ca3440e4ec4899622bc78.gph bitreich.org 70 hAuthor: solene rapenne URL:mailto:solene@dataswamp.org bitreich.org 70 iDate: Thu, 19 May 2016 11:07:31 +0200 Err bitreich.org 70 i Err bitreich.org 70 ifixed error if no tag supplied, customize title of page with article's name Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M generator.lisp | 9 +++++---- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 5 insertions(+), 4 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/generator.lisp b/generator.lisp /scm/cl-yag/file/generator.lisp.gph bitreich.org 70 i@@ -81,7 +81,7 @@ Err bitreich.org 70 i (strip-quotes Err bitreich.org 70 i (mapcar #'(lambda (item) Err bitreich.org 70 i (prepare "template/one-tag.tpl" (template "%%Name%%" item))) Err bitreich.org 70 i- (split-str (getf article :tag ""))))) Err bitreich.org 70 i+ (split-str (getf article :tag))))) Err bitreich.org 70 i Err bitreich.org 70 i ;; generates the html of the whole list of tags Err bitreich.org 70 i (defun get-tag-list() Err bitreich.org 70 i@@ -107,9 +107,9 @@ Err bitreich.org 70 i Err bitreich.org 70 i ;; return a html string Err bitreich.org 70 i ;; produce the code of a whole page with title+layout with the parameter as the content Err bitreich.org 70 i-(defun generate-layout(body) Err bitreich.org 70 i+(defun generate-layout(body &optional &key (title nil)) Err bitreich.org 70 i (prepare "template/layout.tpl" Err bitreich.org 70 i- (template "%%Title%%" (getf *config* :title)) Err bitreich.org 70 i+ (template "%%Title%%" (if title title (getf *config* :title))) Err bitreich.org 70 i (template "%%Tags%%" (get-tag-list)) Err bitreich.org 70 i (template "%%Body%%" body) Err bitreich.org 70 i output)) Err bitreich.org 70 i@@ -159,7 +159,8 @@ Err bitreich.org 70 i ;; produce each article file Err bitreich.org 70 i (dolist (article *articles*) Err bitreich.org 70 i (generate (format nil "article-~d.html" (getf article :id)) Err bitreich.org 70 i- (create-article article :tiny nil))) Err bitreich.org 70 i+ (create-article article :tiny nil) Err bitreich.org 70 i+ :title (concatenate 'string (getf *config* :title) " : " (getf article :title)))) Err bitreich.org 70 i Err bitreich.org 70 i ;; produce index file for each tag Err bitreich.org 70 i (loop for tag in (articles-by-tag) do Err bitreich.org 70 .