-
Notifications
You must be signed in to change notification settings - Fork 1
/
feed.all.njk
46 lines (46 loc) · 1.55 KB
/
feed.all.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Everything
parent: /everything/
permalink: /everything.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
{% include "components/feed.header.njk" %}
{% if collections.all %}
<updated>{{ collections.all | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
{% endif %}
<id>https://ttntm.me/everything</id>
{%- for item in collections.all | reverse -%}
{% if item.data.inEverything %}
{% set absoluteItemUrl %}
{%- if item.url -%}
{{ item.url | htmlBaseUrl(site.url) }}
{%- else -%}
https://ttntm.me/notes/#{{ item.data.weight }}
{%- endif -%}
{% endset %}
<entry>
<title>{{ item.data.title }}</title>
{% if item.data.tags %}
{% for tag in item.data.tags | sort %}
<category term="{{ tag }}" />
{% endfor %}
{% endif %}
<link href="{{ absoluteItemUrl }}"/>
{% set updated = item.data.updated or item.date %}
<updated>{{ updated | dateToRfc3339 }}</updated>
<id>{{ absoluteItemUrl }}</id>
<content type="html"><![CDATA[
{% if item.data.tags %}
{# only blog posts have images & tags #}
{{ item.templateContent | transformWithHtmlBase(site.url) | safe }}
{% else %}
{# skip `transformWithHtmlBase` for everything else #}
{{ item.templateContent | safe }}
{% endif %}
]]></content>
</entry>
{% endif %}
{%- endfor -%}
</feed>