Skip to content

Commit

Permalink
add rss feed template (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
riastrad authored May 31, 2024
1 parent 27b73d1 commit 46b6b54
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _includes/rss.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>cyber(b)space</title>
<description>Josh Erb's Personal Blog</description>
<link>http://www.alexanderle.com</link>
<atom:link href="https://cyberb.space/feed.xml"
rel="self" type="application/rss+xml" />
{{ content | safe }}
</channel>
</rss>
12 changes: 12 additions & 0 deletions feed.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: rss.njk
section: words
permalink: /feed.xml
---
{% set postslist = collections.posts %}
{% for post in postslist | reverse %}
<title>{{ post.data.title }}</title>
<link>{{ post.url | url }}</link>
<guid>{{ post.url | url }}</guid>
<pubDate>{{ post.date | machineDate }}</pubDate>
{% endfor %}

0 comments on commit 46b6b54

Please sign in to comment.