Add the date in the RSS feed - cl-yag - Common Lisp Yet Another website Generat… | |
git clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit fc0d8912469f5ce1e210ded72b2f52f49d307352 | |
parent 013ada82f339f61de56f426824c1c3c1a88bf9b1 | |
Author: Solene Rapenne <[email protected]> | |
Date: Wed, 13 Dec 2017 20:56:37 +0100 | |
Add the date in the RSS feed | |
Diffstat: | |
M generator.lisp | 4 ++++ | |
M templates/rss-item.tpl | 1 + | |
2 files changed, 5 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/generator.lisp b/generator.lisp | |
@@ -212,6 +212,10 @@ | |
(prepare "templates/rss-item.tpl" | |
(template "%%Title%%" (article-title article)) | |
(template "%%Description%%" (load-file (format nil "tem… | |
+ (let ((date (date-parse (article-date article)))) | |
+ (template "%%Date%%" (format nil (date-format "~a, %D… | |
+ (subseq (getf date :dayn… | |
+ (subseq (getf date :mont… | |
(template "%%Url%%" | |
(format nil "~darticle-~d.html" | |
(getf *config* :url) | |
diff --git a/templates/rss-item.tpl b/templates/rss-item.tpl | |
@@ -7,4 +7,5 @@ | |
</description> | |
<guid>%%Url%%</guid> | |
<link>%%Url%%</link> | |
+ <pubDate>%%Date%%</pubDate> | |
</item> |