Add the date in the RSS feed - cl-yag - Common Lisp Yet Another website Generator
HTML git clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/cl-yag/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit fc0d8912469f5ce1e210ded72b2f52f49d307352
DIR parent 013ada82f339f61de56f426824c1c3c1a88bf9b1
HTML Author: Solene Rapenne <solene@perso.pw>
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(-)
---
DIR 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 "temp/data/~d.html" (article-id article))))
+ (let ((date (date-parse (article-date article))))
+ (template "%%Date%%" (format nil (date-format "~a, %DayNumber ~a %Year 00:00:00 GMT" date)
+ (subseq (getf date :dayname) 0 3)
+ (subseq (getf date :monthname) 0 3))))
(template "%%Url%%"
(format nil "~darticle-~d.html"
(getf *config* :url)
DIR 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>