Use RSS plugin to generate feed

This commit is contained in:
Helen Chong 2024-04-16 20:45:41 +08:00
parent ac7b5765d4
commit 0f92290238
2 changed files with 28 additions and 135 deletions

View File

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<generator>RSS Builder by B!Soft</generator>
<title>Leilukin's Hub</title>
<link>https://leilukin.neocities.org/</link>
<description>Leilukin's personal website.</description>
<language>en-gb</language>
<image>
<title>Leilukin's Hub</title>
<link>https://leilukin.neocities.org/</link>
<url>https://leilukin.neocities.org/assets/Leilukins-Hub-website-banner-black-bg.png</url>
<width>900</width>
<height>300</height>
</image>
<item>
<title>Changelog: 5 April 2024</title>
<pubDate>Fri, 5 Apr 2024 17:58:14 +0800</pubDate>
<description><![CDATA[
<ul>
<li>Add table of contents to my <a href="/mycreations/kotor1mods/"><cite>Star Wars: Knights of the Old Republic</cite></a> and <a href="/mycreations/kotor2mods/"><cite>Star Wars: Knights of the Old Republic II: The Sith Lords</cite> mods</a>.</li>
</ul>
]]></description>
</item>
<item>
<title>I Received a Lifetime Premium Membership on Nexus Mods for Free</title>
<pubDate>Thu, 7 Mar 2024 00:07:04 +0800</pubDate>
<link>https://leilukin.neocities.org/blog/posts/2024-03-06-I-Received-a-Lifetime-Premium-Membership-on-Nexus-Mods-for-Free.html</link>
<author>Leilukin</author>
<description><![CDATA[
<p>New blog post.</p>
<p>In light of my mods hosted on Nexus Mods reaching 30,000 unique downloads, I was rewarded a free lifetime Premium membership on Nexus Mods.</p>
]]></description>
</item>
<item>
<title>Changelog: 8 February 2024</title>
<pubDate>Thu, 8 Feb 2024 10:30:34 +0800</pubDate>
<description><![CDATA[
<ul>
<li><cite>Cassette Beasts</cite> <a href="/shrines/cassettebeasts/">shrine</a>: Added <a href="/shrines/cassettebeasts/resources.html">Resources</a> page.</li>
</ul>
]]></description>
</item>
<item>
<title>Changelog: 7 February 2024</title>
<pubDate>Wed, 7 Feb 2024 21:49:21 +0800</pubDate>
<description><![CDATA[
<ul>
<li><a href="/mycreations/">My Creations</a>: Added My Characters section.</li>
</ul>
]]></description>
</item>
<item>
<title>Changelog: 9 January 2024</title>
<pubDate>Tue, 9 Jan 2024 17:29:48 +0800</pubDate>
<description><![CDATA[
<ul>
<li><cite>Cassette Beasts</cite> <a href="/shrines/cassettebeasts/">shrine</a>: Added a new section: My Contributions to the <cite>Cassette Beasts</cite> community.</li>
</ul>
]]></description>
</item>
<item>
<title>Finally Beat A Bug's Life The Video Game — 24 Years Later</title>
<pubDate>Mon, 20 Nov 2023 20:13:18 +0800</pubDate>
<link>https://leilukin.neocities.org/blog/2023-11-20-Finally-Beat-A-Bugs-Life-Video-Game-24-Years-Later.html</link>
<author>Leilukin</author>
<description><![CDATA[
<p>New blog post.</p>
<p>My childhood goal of beating A Bug's Life video game was finally fulfilled.</p>
]]></description>
</item>
<item>
<title>I Can Finally Game on a Solid-State Drive</title>
<pubDate>Sun, 19 Nov 2023 17:10:18 +0800</pubDate>
<link>https://leilukin.neocities.org/blog/2023-11-19-I-Can-Finally-Game-on-a-Solid-State-Drive.html</link>
<author>Leilukin</author>
<description><![CDATA[
<p>New blog post.</p>
<p>I just got the solid-state drive (SSD) of my 5-year-old gaming laptop replaced with a new onw with a larger storage capacity, allowing me to install games on an SSD to enjoy the benefit of gaming on an SSD.</p>
]]></description>
</item>
<item>
<title>Changelog: 9 November 2023</title>
<pubDate>Thu, 9 Nov 2023 20:09:00 +0800</pubDate>
<description><![CDATA[
<ul>
<li>Added extra header elements to the main site and the shrines to be dynamically displayed on certain days to celebrate special events. (Credit to <a href="https://kotor.neocities.org/" target="_blank">KotOR Community Portal</a> for the inspiration)</li>
</ul>
]]></description>
</item>
<item>
<title>Support for My Steam Review of A Summer's End — Hong Kong 1986</title>
<pubDate>Mon, 30 Oct 2023 12:10:16 +0800</pubDate>
<link>https://leilukin.neocities.org/blog/2023-10-30-Support-for-My-Steam-Review-of-A-Summers-End</link>
<author>Leilukin</author>
<description><![CDATA[
<p>New blog post.</p>
<p>A thank you post for the people who have supported my Steam review of <cite>A Summer's End — Hong Kong 1986</cite>.</p>
]]></description>
</item>
<item>
<title>Changelog: 18 October 2923</title>
<pubDate>Wed, 18 Oct 2023 16:56:23 +0800</pubDate>
<description><![CDATA[
<ul>
<li><cite>Cassette Beasts</cite> <a href="https://leilukin.neocities.org/shrines/cassettebeasts/">shrine</a>: Added Developer Notes section to the <a href="https://leilukin.neocities.org/shrines/cassettebeasts/trivia.html">Trivia</a> page.</li>
</ul>
]]></description>
</item>
<item>
<title>My Cassette Beasts Pombomb Plushie Arrived!</title>
<pubDate>Fri, 13 Oct 2023 22:47:22 +0800</pubDate>
<link>https://leilukin.neocities.org/blog/posts/2023-10-13-My-Cassette-Beasts-Pombomb-Plushie-Arrived.html</link>
<author>Leilukin</author>
<description><![CDATA[
<p>New blog post.</p>
<p>The official Cassette Beasts Pombomb plushie I purchased finally arrived.</p>
]]></description>
</item>
<item>
<title>Changelog: 4 Ocrober 2023</title>
<pubDate>Wed, 4 Oct 2023 22:39:31 +0800</pubDate>
<description><![CDATA[
<ul>
<li><cite>Cassette Beasts</cite> <a href="https://leilukin.neocities.org/shrines/cassettebeasts/">shrine</a>: Updated the Development History section of the <a href="https://leilukin.neocities.org/shrines/cassettebeasts/trivia.html">Trivia</a> page with info about the release of Update 1.5 and "Pier of the Unknown" DLC.</li>
</ul>
]]></description>
</item>
</channel>
</rss>

28
src/feed.njk Normal file
View File

@ -0,0 +1,28 @@
---
# sitemeta comes from _data/sitemeta.js
permalink: /feed.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ sitemeta.title }}</title>
<subtitle>{{ sitemeta.siteDescription }}</subtitle>
<link href="{{ sitemeta.feedUrl }}" rel="self"/>
<link href="{{ sitemeta.siteUrl }}"/>
<updated>{{ collections.feedItems | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ sitemeta.siteUrl }}</id>
<author>
<name>{{ sitemeta.siteAuthor.name }}</name>
<email>{{ sitemeta.siteAuthor.email }}</email>
</author>
{%- for item in collections.feedItems | reverse %}
{% set absolutePostUrl %}{{ item.url | url | absoluteUrl(sitemeta.siteUrl) }}{% endset %}
<entry>
<title>{{ item.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ item.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ item.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endfor %}
</feed>