Add the date in the RSS feed

This commit is contained in:
Solene Rapenne 2017-12-13 20:56:37 +01:00
parent 013ada82f3
commit fc0d891246
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -7,4 +7,5 @@
</description>
<guid>%%Url%%</guid>
<link>%%Url%%</link>
<pubDate>%%Date%%</pubDate>
</item>