iIndex of articles page - 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 994f2224eb625f71b68cb00a77edc37068f0f059 /scm/cl-yag/commit/994f2224eb625f71b68cb00a77edc37068f0f059.gph bitreich.org 70
1parent 93abe73f502660ada5aeb21bd6eaffec14f8fef3 /scm/cl-yag/commit/93abe73f502660ada5aeb21bd6eaffec14f8fef3.gph bitreich.org 70
hAuthor: Solene Rapenne <solene@perso.pw> URL:mailto:solene@perso.pw bitreich.org 70
iDate: Sat, 21 Jan 2017 16:53:27 +0100 Err bitreich.org 70
i Err bitreich.org 70
iIndex of articles page Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M generator.lisp | 20 ++++++++++++-------- Err bitreich.org 70
i M template/layout.tpl | 2 +- Err bitreich.org 70
i Err bitreich.org 70
i2 files changed, 13 insertions(+), 9 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@@ -94,16 +94,18 @@ Err bitreich.org 70
i Err bitreich.org 70
i ;; generates the html of one only article Err bitreich.org 70
i ;; this is called in a loop to produce the homepage Err bitreich.org 70
i-(defun create-article(article &optional &key (tiny t)) Err bitreich.org 70
i+(defun create-article(article &optional &key (tiny t) (no-text nil)) Err bitreich.org 70
i (prepare "template/article.tpl" Err bitreich.org 70
i (template "%%Author%%" (getf article :author (getf *config* :webmaster))) Err bitreich.org 70
i (template "%%Date%%" (getf article :date)) Err bitreich.org 70
i (template "%%Title%%" (getf article :title)) Err bitreich.org 70
i (template "%%Id%%" (getf article :id)) Err bitreich.org 70
i (template "%%Tags%%" (get-tag-list-article article)) Err bitreich.org 70
i- (template "%%Text%%" (if (and tiny (member :tiny article)) Err bitreich.org 70
i- (getf article :tiny) Err bitreich.org 70
i- (load-file (format nil "temp/data/~d.html" (getf article :id))))))) Err bitreich.org 70
i+ (template "%%Text%%" (if no-text Err bitreich.org 70
i+ "" Err bitreich.org 70
i+ (if (and tiny (member :tiny article)) Err bitreich.org 70
i+ (getf article :tiny) Err bitreich.org 70
i+ (load-file (format nil "temp/data/~d.html" (getf article :id)))))))) 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@@ -116,10 +118,10 @@ Err bitreich.org 70
i Err bitreich.org 70
i Err bitreich.org 70
i ;; html generation of index homepage Err bitreich.org 70
i-(defun generate-semi-mainpage() Err bitreich.org 70
i+(defun generate-semi-mainpage(&key (tiny t) (no-text nil)) Err bitreich.org 70
i (strip-quotes Err bitreich.org 70
i (loop for article in *articles* collect Err bitreich.org 70
i- (create-article article :tiny t)))) Err bitreich.org 70
i+ (create-article article :tiny tiny :no-text no-text)))) Err bitreich.org 70
i Err bitreich.org 70
i ;; html generation of a tag homepage Err bitreich.org 70
i (defun generate-tag-mainpage(articles-in-tag) Err bitreich.org 70
i@@ -150,12 +152,14 @@ Err bitreich.org 70
i (template "%%Url%%" (getf *config* :url)) Err bitreich.org 70
i (template "%%Items%%" (generate-rss-item)))) Err bitreich.org 70
i Err bitreich.org 70
i- Err bitreich.org 70
i ;; We do all the website Err bitreich.org 70
i (defun create-html-site() Err bitreich.org 70
i ;; produce index.html Err bitreich.org 70
i (generate "output/html/index.html" (generate-semi-mainpage)) Err bitreich.org 70
i- Err bitreich.org 70
i+ Err bitreich.org 70
i+ ;; produce index-titles.html where there are only articles titles Err bitreich.org 70
i+ (generate "output/html/index-titles.html" (generate-semi-mainpage :no-text t)) Err bitreich.org 70
i+ 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 "output/html/article-~d.html" (getf article :id)) Err bitreich.org 70
1diff --git a/template/layout.tpl b/template/layout.tpl /scm/cl-yag/file/template/layout.tpl.gph bitreich.org 70
i@@ -8,7 +8,7 @@ Err bitreich.org 70
i <body> Err bitreich.org 70
i Err bitreich.org 70
i <div id="top"> Err bitreich.org 70
i- <a href="index.html">Home</a> <a href="rss.xml">Rss</a> Err bitreich.org 70
i+ <a href="index.html">Home</a> - <a href="index-titles.html">List of articles</a> - <a href="rss.xml">Rss</a> Err bitreich.org 70
i <p>Tags : %%Tags%%</p> Err bitreich.org 70
i </div> Err bitreich.org 70
i Err bitreich.org 70
.
Response:
text/plain