Merge pull request #38 from stackbithq/feature/feed-url-dedupe

Builds feed URL from site URL to reduce replication
This commit is contained in:
Zach Leatherman 2020-01-02 21:06:20 -06:00 committed by GitHub
commit 179eefcad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

1
_data/metadata.json Normal file → Executable file
View File

@ -6,7 +6,6 @@
"subtitle": "I am writing about my experiences as a naval navel-gazer.",
"filename": "feed.xml",
"path": "/feed/feed.xml",
"url": "https://myurl.com/feed/feed.xml",
"id": "https://myurl.com/"
},
"author": {

3
feed/feed.njk Normal file → Executable file
View File

@ -6,7 +6,8 @@ eleventyExcludeFromCollections: true
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.feed.subtitle }}</subtitle>
<link href="{{ metadata.feed.url }}" rel="self"/>
{% set absoluteUrl %}{{ metadata.feed.path | url | absoluteUrl(metadata.url) }}{% endset %}
<link href="{{ absoluteUrl }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
<id>{{ metadata.feed.id }}</id>