Merge pull request #38 from stackbithq/feature/feed-url-dedupe
Builds feed URL from site URL to reduce replication
This commit is contained in:
commit
179eefcad1
1
_data/metadata.json
Normal file → Executable file
1
_data/metadata.json
Normal file → Executable file
@ -6,7 +6,6 @@
|
|||||||
"subtitle": "I am writing about my experiences as a naval navel-gazer.",
|
"subtitle": "I am writing about my experiences as a naval navel-gazer.",
|
||||||
"filename": "feed.xml",
|
"filename": "feed.xml",
|
||||||
"path": "/feed/feed.xml",
|
"path": "/feed/feed.xml",
|
||||||
"url": "https://myurl.com/feed/feed.xml",
|
|
||||||
"id": "https://myurl.com/"
|
"id": "https://myurl.com/"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
|
3
feed/feed.njk
Normal file → Executable file
3
feed/feed.njk
Normal file → Executable file
@ -6,7 +6,8 @@ eleventyExcludeFromCollections: true
|
|||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<title>{{ metadata.title }}</title>
|
<title>{{ metadata.title }}</title>
|
||||||
<subtitle>{{ metadata.feed.subtitle }}</subtitle>
|
<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 }}"/>
|
<link href="{{ metadata.url }}"/>
|
||||||
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
|
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
|
||||||
<id>{{ metadata.feed.id }}</id>
|
<id>{{ metadata.feed.id }}</id>
|
||||||
|
Loading…
Reference in New Issue
Block a user