git/cl-yag/commit/c50345cdbd29f5e9c0a91ca3666e4ff93590aba6.html (5536 bytes)
1 <!DOCTYPE html> 2 <html lang="en"><head><meta charset="UTF-8" /> 3 <meta name="viewport" content="width=device-width, initial-scale=1" /> 4 <title>cl-yag c50345cd - Recently Written</title> 5 <link rel="stylesheet" href="../../stagit.css" /> 6 </head><body> 7 <div id="top"><a href="../../../index.html">Recently Written</a> · <a href="../../index.html">git</a></div> 8 <h1>cl-yag</h1><span class="desc">Mirror and rewrite of Solène Rapenne's cl-yag SSG of renown</span><p class="url">git clone https://github.com/equwal/cl-yag</p><p><a href="../../cl-yag/index.html">Log</a> | <a href="../../cl-yag/files.html">Files</a> | <a href="../../cl-yag/refs.html">Refs</a></p><hr/> 9 <div id="content"> 10 <pre>commit c50345cdbd29f5e9c0a91ca3666e4ff93590aba6 11 Solene Rapenne <solene@perso.pw> 12 2017-11-17 14:51:35 +0000 13 14 rename template to templates 15 16 </pre><pre> generator.lisp | 14 +++++++------- 17 {template => templates}/article.tpl | 0 18 {template => templates}/gopher_head.tpl | 0 19 {template => templates}/layout.tpl | 0 20 {template => templates}/one-tag.tpl | 0 21 {template => templates}/rss-item.tpl | 0 22 {template => templates}/rss.tpl | 0 23 7 files changed, 7 insertions(+), 7 deletions(-) 24 </pre><pre>diff --git a/generator.lisp b/generator.lisp 25 index c99042d..72d3e99 100644 26 --- a/generator.lisp 27 +++ b/generator.lisp 28 <span class="h">@@ -84,14 +84,14 @@</span> 29 (defun get-tag-list-article(&optional article) 30 (strip-quotes 31 (mapcar #'(lambda (item) 32 <span class="d">- (prepare "template/one-tag.tpl" (template "%%Name%%" item)))</span> 33 <span class="a">+ (prepare "templates/one-tag.tpl" (template "%%Name%%" item)))</span> 34 (split-str (getf article :tag))))) 35 36 ;; generates the html of the whole list of tags 37 (defun get-tag-list() 38 (strip-quotes 39 (mapcar #'(lambda (item) 40 <span class="d">- (prepare "template/one-tag.tpl"</span> 41 <span class="a">+ (prepare "templates/one-tag.tpl"</span> 42 (template "%%Name%%" (getf item :name)))) 43 (articles-by-tag)))) 44 45 <span class="h">@@ -99,7 +99,7 @@</span> 46 ;; generates the html of one only article 47 ;; this is called in a loop to produce the homepage 48 (defun create-article(article &optional &key (tiny t) (no-text nil)) 49 <span class="d">- (prepare "template/article.tpl"</span> 50 <span class="a">+ (prepare "templates/article.tpl"</span> 51 (template "%%Author%%" (getf article :author (getf *config* :webmaster))) 52 (template "%%Date%%" (getf article :date)) 53 (template "%%Title%%" (getf article :title)) 54 <span class="h">@@ -114,7 +114,7 @@</span> 55 ;; return a html string 56 ;; produce the code of a whole page with title+layout with the parameter as the content 57 (defun generate-layout(body &optional &key (title nil)) 58 <span class="d">- (prepare "template/layout.tpl"</span> 59 <span class="a">+ (prepare "templates/layout.tpl"</span> 60 (template "%%Title%%" (if title title (getf *config* :title))) 61 (template "%%Tags%%" (get-tag-list)) 62 (template "%%Body%%" body) 63 <span class="h">@@ -140,7 +140,7 @@</span> 64 (loop for article in *articles* 65 for i from 1 to (if (> (length *articles*) (getf *config* :rss-item-number)) (getf *config* :rss-item-number) (length *articles*)) 66 collect 67 <span class="d">- (prepare "template/rss-item.tpl"</span> 68 <span class="a">+ (prepare "templates/rss-item.tpl"</span> 69 (template "%%Title%%" (getf article :title)) 70 (template "%%Description%%" (load-file (format nil "temp/data/~d.html" (getf article :id)))) 71 (template "%%Url%%" 72 <span class="h">@@ -150,7 +150,7 @@</span> 73 74 ;; Generate the rss xml data 75 (defun generate-rss() 76 <span class="d">- (prepare "template/rss.tpl"</span> 77 <span class="a">+ (prepare "templates/rss.tpl"</span> 78 (template "%%Description%%" (getf *config* :description)) 79 (template "%%Title%%" (getf *config* :title)) 80 (template "%%Url%%" (getf *config* :url)) 81 <span class="h">@@ -183,7 +183,7 @@</span> 82 83 ;; produce the gophermap file 84 (save-file "output/gopher/gophermap" 85 <span class="d">- (let ((output (load-file "template/gopher_head.tpl")))</span> 86 <span class="a">+ (let ((output (load-file "templates/gopher_head.tpl")))</span> 87 (dolist (article *articles*) 88 (setf output 89 (string 90 diff --git a/template/article.tpl b/templates/article.tpl 91 similarity index 100% 92 rename from template/article.tpl 93 rename to templates/article.tpl 94 diff --git a/template/gopher_head.tpl b/templates/gopher_head.tpl 95 similarity index 100% 96 rename from template/gopher_head.tpl 97 rename to templates/gopher_head.tpl 98 diff --git a/template/layout.tpl b/templates/layout.tpl 99 similarity index 100% 100 rename from template/layout.tpl 101 rename to templates/layout.tpl 102 diff --git a/template/one-tag.tpl b/templates/one-tag.tpl 103 similarity index 100% 104 rename from template/one-tag.tpl 105 rename to templates/one-tag.tpl 106 diff --git a/template/rss-item.tpl b/templates/rss-item.tpl 107 similarity index 100% 108 rename from template/rss-item.tpl 109 rename to templates/rss-item.tpl 110 diff --git a/template/rss.tpl b/templates/rss.tpl 111 similarity index 100% 112 rename from template/rss.tpl 113 rename to templates/rss.tpl</pre> 114 </div></body></html>