mirror of
https://github.com/danog/sass-site.git
synced 2025-01-22 13:51:46 +01:00
Serve atom feed at /feed and /feed.xml
This commit is contained in:
parent
5487a00d66
commit
72721bb025
@ -1,5 +1,12 @@
|
||||
---
|
||||
permalink: 'feed.xml'
|
||||
pagination:
|
||||
data: urls
|
||||
alias: url
|
||||
size: 1
|
||||
urls:
|
||||
- 'feed.xml'
|
||||
- 'feed'
|
||||
permalink: '{{ url }}'
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
@ -7,7 +14,7 @@ eleventyExcludeFromCollections: true
|
||||
<title>Sass Blog</title>
|
||||
<id>{{ '/blog' | absoluteUrl: site.url }}</id>
|
||||
<link href="{{ '/blog' | absoluteUrl: site.url }}"/>
|
||||
<link href="{{ page.url | absoluteUrl: site.url }}" rel="self"/>
|
||||
<link href="{{ '/feed.xml' | absoluteUrl: site.url }}" rel="self"/>
|
||||
<updated>{{ collections.blog | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||
{%- assign posts = collections.blog | reverse -%}
|
||||
{%- for post in posts limit:6 %}
|
||||
@ -17,6 +24,7 @@ eleventyExcludeFromCollections: true
|
||||
<link href="{{ absolutePostUrl }}" rel="alternate"/>
|
||||
<id>{{ absolutePostUrl }}</id>
|
||||
<published>{{ post.date | dateToRfc3339 }}</published>
|
||||
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
||||
<author>
|
||||
<name>{{ post.data.author }}</name>
|
||||
</author>
|
||||
|
Loading…
x
Reference in New Issue
Block a user