Initiate feed path in sitemeta

This commit is contained in:
Helen Chong 2024-08-11 23:13:34 +08:00
parent 197b2e76c7
commit 4eb9ef3c0a
7 changed files with 11 additions and 8 deletions

View File

@ -8,4 +8,6 @@ export const siteAuthor = {
}; };
export const siteLocale = "en_MY"; export const siteLocale = "en_MY";
export const siteLanguage = "en"; export const siteLanguage = "en";
export const siteDescription = siteAuthor.name + "'s personal website."; export const siteDescription = siteAuthor.name + "'s personal website.";
export const feedPath = "/feed.xml";
export const feedUrl = siteUrl + feedPath;

View File

@ -1 +1 @@
<link rel="alternate" type="application/rss+xml" title="{{ sitemeta.siteName }}" href="/feed.xml"> <link rel="alternate" type="application/rss+xml" title="{{ sitemeta.siteName }}" href="{{ sitemeta.feedPath }}">

View File

@ -22,7 +22,7 @@ articleElement: true
</ul> </ul>
</nav> </nav>
<p>To get notified of the updates on this website, you can subscribe to the <a href="/feed.xml">{{ sitemeta.siteName }} RSS feed</a>, which contains new articles, blog posts and website changelogs.</p> <p>To get notified of the updates on this website, you can subscribe to the <a href="{{ sitemeta.feedPath }}">{{ sitemeta.siteName }} RSS feed</a>, which contains new articles, blog posts and website changelogs.</p>
{{ content | safe }} {{ content | safe }}

View File

@ -5,7 +5,7 @@
{% set currentUrl %}{{ page.url }}{% endset %} {% set currentUrl %}{{ page.url }}{% endset %}
<ul class="inline-nav footer__links"> <ul class="inline-nav footer__links">
<li><a href="/feed.xml">RSS</a></li> <li><a href="{{ sitemeta.feedPath }}">RSS</a></li>
<li><a <li><a
{% if currentUrl === "/sitemap/" %}aria-current="page"{% endif %} {% if currentUrl === "/sitemap/" %}aria-current="page"{% endif %}
href="/sitemap/ href="/sitemap/

View File

@ -9,7 +9,7 @@ categories: ["site updates", "site anniversary"]
I registered a Neocities account on 28 May 2022, while my own website, Leilukin's Hub, was officially launched on 11 September 2022. I set up this website because I wanted to have a personal web page outside social media platforms to gather various stuff and resources I had created or compiled on online spaces throughout the years. Furthermore, I settled for Neocities because I like the flexibility of customisation by coding my website with HTML, CSS and JavaScript. Initially, I considered and tried [Carrd](https://carrd.co/) to create my web pages, but free accounts on Carrd can only add up to 100 elements on a web page, which is not enough for my purpose. I registered a Neocities account on 28 May 2022, while my own website, Leilukin's Hub, was officially launched on 11 September 2022. I set up this website because I wanted to have a personal web page outside social media platforms to gather various stuff and resources I had created or compiled on online spaces throughout the years. Furthermore, I settled for Neocities because I like the flexibility of customisation by coding my website with HTML, CSS and JavaScript. Initially, I considered and tried [Carrd](https://carrd.co/) to create my web pages, but free accounts on Carrd can only add up to 100 elements on a web page, which is not enough for my purpose.
This site's [changelog](/changelogs/) and [layout archive](/changelogs/layouts) document the evolution of Leilukin's Hub throughout the past year: from the humble beginning of a simple black background with white text and light brown titles, to the responsive, mobile-friendly, full-fledged personal website with its own site button, [RSS feed](/feed.xml), a [blog](https://htmltomd.com/blog/) and multiple [shrines](/shrines/). This site's [changelog](/changelogs/) and [layout archive](/changelogs/layouts) document the evolution of Leilukin's Hub throughout the past year: from the humble beginning of a simple black background with white text and light brown titles, to the responsive, mobile-friendly, full-fledged personal website with its own site button, [RSS feed](/feed.xml), a [blog](/blog) and multiple [shrines](/shrines).
Coding my own website was also an excellent way to put my HTML and CSS knowledge and skills into good use. I already had basic knowledge of HTML and CSS from what I learned from my teenage years of customising my blog on Blogger. Coding my own website was also an excellent way to put my HTML and CSS knowledge and skills into good use. I already had basic knowledge of HTML and CSS from what I learned from my teenage years of customising my blog on Blogger.

View File

@ -1,13 +1,14 @@
--- ---
# sitemeta comes from _data/sitemeta.js # sitemeta comes from _data/sitemeta.js
permalink: /feed.xml
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
eleventyComputed:
permalink: {{ sitemeta.feedPath }}
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ sitemeta.siteName }}</title> <title>{{ sitemeta.siteName }}</title>
<subtitle>{{ sitemeta.siteDescription }}</subtitle> <subtitle>{{ sitemeta.siteDescription }}</subtitle>
<link href="{{ sitemeta.siteUrl + permalink }}" rel="self"/> <link href="{{ sitemeta.feedUrl }}" rel="self"/>
<link href="{{ sitemeta.siteUrl }}"/> <link href="{{ sitemeta.siteUrl }}"/>
<updated>{{ collections.feedItems | getNewestCollectionItemDate | dateToRfc3339 }}</updated> <updated>{{ collections.feedItems | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ sitemeta.siteUrl }}/</id> <id>{{ sitemeta.siteUrl }}/</id>

View File

@ -57,7 +57,7 @@ eleventyComputed:
{%- endfor %} {%- endfor %}
<p><a href="/changelogs">View all site changelogs</a></p> <p><a href="/changelogs">View all site changelogs</a></p>
</div> </div>
<p>You can subscribe to the <a href="/feed.xml">{{ sitemeta.siteName }} RSS feed</a> to get notified of the updates on this website, including new articles, blog posts and website changelogs.</p> <p>You can subscribe to the <a href="{{ sitemeta.feedPath }}">{{ sitemeta.siteName }} RSS feed</a> to get notified of the updates on this website, including new articles, blog posts and website changelogs.</p>
{% include "main/statuscafe.njk" %} {% include "main/statuscafe.njk" %}
</section> </section>