refactor: migrate to /blog subdirectory

This commit is contained in:
2022-11-09 09:45:19 +01:00
parent 1d65e67ca4
commit 782f466ee6
17 changed files with 45 additions and 47 deletions

27
src/_pages/blog/feed/feed.njk Executable file
View File

@@ -0,0 +1,27 @@
---
# Metadata comes from _data/metadata.json
permalink: /blog/feed/feed.xml
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.language }}">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.description }}</subtitle>
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/>
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/>
<updated>{{ collections.articles | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for article in collections.articles | reverse %}
{% set absolutePostUrl %}{{ article.url | htmlBaseUrl(metadata.url) }}{% endset %}
<entry>
<title>{{ article.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ article.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ article.templateContent | transformWithHtmlBase(absolutePostUrl, article.url) }}</content>
</entry>
{%- endfor %}
</feed>