Reuse feed backs from metadata file and adds comments about it.

This commit is contained in:
Zach Leatherman 2020-07-27 11:39:08 -05:00
parent 7be229d9d0
commit b078457afb
3 changed files with 8 additions and 5 deletions

View File

@ -14,6 +14,7 @@
}, },
"author": { "author": {
"name": "Your Name Here", "name": "Your Name Here",
"email": "youremailaddress@example.com" "email": "youremailaddress@example.com",
"url": "https://myurl.com/"
} }
} }

View File

@ -1,5 +1,6 @@
--- ---
permalink: feed/feed.xml # Metadata comes from _data/metadata.json
permalink: "{{ metadata.feed.path }}"
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>

View File

@ -1,5 +1,6 @@
--- ---
permalink: feed/feed.json # Metadata comes from _data/metadata.json
permalink: "{{ metadata.jsonfeed.path }}"
eleventyExcludeFromCollections: true eleventyExcludeFromCollections: true
--- ---
{ {
@ -13,8 +14,8 @@ eleventyExcludeFromCollections: true
"url": "{{ metadata.author.url }}" "url": "{{ metadata.author.url }}"
}, },
"items": [ "items": [
{%- for post in collections.posts %} {%- for post in collections.posts | reverse %}
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset -%} {%- set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset -%}
{ {
"id": "{{ absolutePostUrl }}", "id": "{{ absolutePostUrl }}",
"url": "{{ absolutePostUrl }}", "url": "{{ absolutePostUrl }}",