diff options
author | Indrajith K L | 2022-09-03 03:13:50 +0530 |
---|---|---|
committer | Indrajith K L | 2022-09-03 03:13:50 +0530 |
commit | 8368cbbd80f9dfe5539dfdf3e4b819c1228dcb22 (patch) | |
tree | 6adfc918dcfe17d997d0faabd3da459906fc1452 /src | |
parent | 7121a634d79b79e158ca91ce68051b2805733fa9 (diff) | |
download | indrajith-dev-8368cbbd80f9dfe5539dfdf3e4b819c1228dcb22.tar.gz indrajith-dev-8368cbbd80f9dfe5539dfdf3e4b819c1228dcb22.tar.bz2 indrajith-dev-8368cbbd80f9dfe5539dfdf3e4b819c1228dcb22.zip |
Adds RSS Feed
Diffstat (limited to 'src')
-rw-r--r-- | src/rss/feed.njk | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/rss/feed.njk b/src/rss/feed.njk new file mode 100644 index 0000000..379f5fd --- /dev/null +++ b/src/rss/feed.njk @@ -0,0 +1,37 @@ +---json +{ + "permalink": "feed.xml", + "eleventyExcludeFromCollections": true, + "metadata": { + "title": "indrajith.dev", + "subtitle": "This site is where I write about my fun side projects, R&D's, random thoughts, game development etc.", + "language": "en", + "url": "https://indrajith.dev/", + "author": { + "name": "Indrajith K L", + "email": "indrajith@indrajith.dev" + } + } +} +--- +<?xml version="1.0" encoding="utf-8"?> +<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ metadata.url }}" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ metadata.title }}</title> + <link>{{ metadata.url }}</link> + <atom:link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self" type="application/rss+xml" /> + <description>{{ metadata.subtitle }}</description> + <language>{{ metadata.language }}</language> + {%- for post in collections.posts | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.url) %} + <item> + <title>{{ post.data.title }}</title> + <link>{{ absolutePostUrl }}</link> + <description>{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</description> + <pubDate>{{ post.date | dateToRfc822 }}</pubDate> + <dc:creator>{{ metadata.author.name }}</dc:creator> + <guid>{{ absolutePostUrl }}</guid> + </item> + {%- endfor %} + </channel> +</rss>
\ No newline at end of file |