refactor: ♻️ move author information into entry field, add categories
This commit is contained in:
parent
fbfbe92aa1
commit
fdbcf9a8ab
1 changed files with 7 additions and 3 deletions
10
src/feed.njk
10
src/feed.njk
|
@ -15,16 +15,20 @@ metadata:
|
||||||
<link href="{{ metadata.base | addPathPrefixToFullUrl }}"/>
|
<link href="{{ metadata.base | addPathPrefixToFullUrl }}"/>
|
||||||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||||
<id>{{ metadata.base | addPathPrefixToFullUrl }}</id>
|
<id>{{ metadata.base | addPathPrefixToFullUrl }}</id>
|
||||||
<author>
|
|
||||||
<name>{{ metadata.author.name }}</name>
|
|
||||||
</author>
|
|
||||||
{%- for post in collections.posts | reverse %}
|
{%- for post in collections.posts | reverse %}
|
||||||
{%- set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.base) }}{% endset %}
|
{%- set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.base) }}{% endset %}
|
||||||
<entry>
|
<entry>
|
||||||
|
<author>
|
||||||
|
<name>{{ post.data.author.name }}</name>
|
||||||
|
<uri>{{ post.data.author.href }}</uri>
|
||||||
|
</author>
|
||||||
<title>{{ post.data.title }}</title>
|
<title>{{ post.data.title }}</title>
|
||||||
<link href="{{ absolutePostUrl }}"/>
|
<link href="{{ absolutePostUrl }}"/>
|
||||||
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
||||||
<id>{{ absolutePostUrl }}</id>
|
<id>{{ absolutePostUrl }}</id>
|
||||||
|
{%- for tag in post.data.tags %}
|
||||||
|
<category term="{{ tag }}" />
|
||||||
|
{%- endfor %}
|
||||||
<content type="html">
|
<content type="html">
|
||||||
<img src="{{ post.data.image.src }}.webp?width=1200" alt="{{ post.data.image.alt }}">
|
<img src="{{ post.data.image.src }}.webp?width=1200" alt="{{ post.data.image.alt }}">
|
||||||
{{ post.content | renderTransforms(post.data.page, metadata.base) }}
|
{{ post.content | renderTransforms(post.data.page, metadata.base) }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue