Skip to content

Commit

Permalink
Builds feed URL from site URL to reduce replication
Browse files Browse the repository at this point in the history
  • Loading branch information
benedfit committed Jul 23, 2019
1 parent 105436b commit a9f9d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion _data/metadata.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion feed/feed.njk
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit a9f9d1b

Please sign in to comment.