Recently Written · git

recentlywritten

my writings (done recently)

git clone https://github.com/equwal/recentlywritten

Log | Files | Refs


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> &middot; <a href="../../index.html">git</a></div>
8 <h1>cl-yag</h1><span class="desc">Mirror and rewrite of Solène Rapenne&#x27;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 &lt;solene@perso.pw&gt;
12 2017-11-17 14:51:35 +0000
13 
14 rename template to templates
15 
16 </pre><pre> generator.lisp                          | 14 +++++++-------
17  {template =&gt; templates}/article.tpl     |  0
18  {template =&gt; templates}/gopher_head.tpl |  0
19  {template =&gt; templates}/layout.tpl      |  0
20  {template =&gt; templates}/one-tag.tpl     |  0
21  {template =&gt; templates}/rss-item.tpl    |  0
22  {template =&gt; 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(&amp;optional article)
30    (strip-quotes
31     (mapcar #&#x27;(lambda (item)
32 <span class="d">-	       (prepare &quot;template/one-tag.tpl&quot; (template &quot;%%Name%%&quot; item)))</span>
33 <span class="a">+	       (prepare &quot;templates/one-tag.tpl&quot; (template &quot;%%Name%%&quot; 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 #&#x27;(lambda (item)
40 <span class="d">-	       (prepare &quot;template/one-tag.tpl&quot;</span>
41 <span class="a">+	       (prepare &quot;templates/one-tag.tpl&quot;</span>
42  			(template &quot;%%Name%%&quot; (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 &amp;optional &amp;key (tiny t) (no-text nil))
49 <span class="d">-  (prepare &quot;template/article.tpl&quot;</span>
50 <span class="a">+  (prepare &quot;templates/article.tpl&quot;</span>
51  	   (template &quot;%%Author%%&quot; (getf article :author (getf *config* :webmaster)))
52  	   (template &quot;%%Date%%&quot;   (getf article :date))
53  	   (template &quot;%%Title%%&quot;  (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 &amp;optional &amp;key (title nil))
58 <span class="d">-  (prepare &quot;template/layout.tpl&quot;</span>
59 <span class="a">+  (prepare &quot;templates/layout.tpl&quot;</span>
60  	   (template &quot;%%Title%%&quot; (if title title (getf *config* :title)))
61  	   (template &quot;%%Tags%%&quot; (get-tag-list))
62  	   (template &quot;%%Body%%&quot; body)
63 <span class="h">@@ -140,7 +140,7 @@</span>
64     (loop for article in *articles*
65  	 for i from 1 to (if (&gt; (length *articles*) (getf *config* :rss-item-number)) (getf *config* :rss-item-number) (length *articles*))
66  	 collect
67 <span class="d">-	 (prepare &quot;template/rss-item.tpl&quot;</span>
68 <span class="a">+	 (prepare &quot;templates/rss-item.tpl&quot;</span>
69  		  (template &quot;%%Title%%&quot; (getf article :title))
70  		  (template &quot;%%Description%%&quot; (load-file (format nil &quot;temp/data/~d.html&quot; (getf article :id))))
71  		  (template &quot;%%Url%%&quot;
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 &quot;template/rss.tpl&quot;</span>
77 <span class="a">+  (prepare &quot;templates/rss.tpl&quot;</span>
78  	   (template &quot;%%Description%%&quot; (getf *config* :description))
79  	   (template &quot;%%Title%%&quot; (getf *config* :title))
80  	   (template &quot;%%Url%%&quot; (getf *config* :url))
81 <span class="h">@@ -183,7 +183,7 @@</span>
82  
83    ;; produce the gophermap file
84    (save-file &quot;output/gopher/gophermap&quot;
85 <span class="d">-	     (let ((output (load-file &quot;template/gopher_head.tpl&quot;)))</span>
86 <span class="a">+	     (let ((output (load-file &quot;templates/gopher_head.tpl&quot;)))</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>