refactor: migrate to /blog subdirectory
This commit is contained in:
27
src/_pages/blog/feed/feed.njk
Executable file
27
src/_pages/blog/feed/feed.njk
Executable 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>
|
Reference in New Issue
Block a user