diff options
Diffstat (limited to '')
-rwxr-xr-x | server.js | 4 | ||||
-rw-r--r-- | views/rss_feed_v2.pug | 21 |
2 files changed, 23 insertions, 2 deletions
@@ -25,7 +25,7 @@ const morgan = require("morgan"); const model = require("./model"); model.dbInit(); -model.populateDB(model.blogPost); +// model.populateDB(model.blogPost); const app = express(); app.disable("x-powered-by"); @@ -141,7 +141,7 @@ app.get("/rss/feed", (req, res) => { .select("title slug lastUpdatedAt teaser") .exec(function (err, posts) { if (err) return err; - return res.render("rss_feed.pug", { cache: true, posts: posts }); + return res.render("rss_feed_v2.pug", { cache: true, posts: posts }); }); }); diff --git a/views/rss_feed_v2.pug b/views/rss_feed_v2.pug new file mode 100644 index 0000000..92c9a87 --- /dev/null +++ b/views/rss_feed_v2.pug @@ -0,0 +1,21 @@ +doctype xml +rss(version='2.0') + channel + title deviblog + link https://blog.terminaldweller.com + description I talk about software here. + managingEditro devi@terminaldweller.com + webMaster devi@terminaldweller.com + language en-US + if posts.length + lastBuildDate= new Date(posts[0].lastUpdatedAt).toUTCString() + each post in posts + item + title= post.title + link https://blog.terminaldweller.com/posts/#{post.slug} + description + | <![CDATA[ + | #{post.teaser} + | ]]> + pubDate= new Date(post.lastUpdatedAt).toUTCString() + guid(isPermaLink='false') https://blog.terminaldweller.com/blog/#{post.slug} |