Repository navigation
Expand file tree
/
Copy pathfeed.xml
More file actions
36 lines (36 loc) · 1.69 KB
/
Copy pathfeed.xml
File metadata and controls
36 lines (36 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
layout: null
permalink: /feed.xml
sitemap: false
---
{%- comment -%}
The site's only feed: FPL blog posts. Because this file exists, jekyll-feed skips generating
its default announcements (_posts) feed at /feed.xml. The plugin stays for {% raw %}{% feed_meta %}{% endraw %}
in the minima <head>, which now advertises this feed.
{%- endcomment -%}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title | xml_escape }} Blog</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml"/>
<link href="{{ '/blog/' | absolute_url }}" rel="alternate" type="text/html"/>
<id>{{ page.url | absolute_url }}</id>
<updated>{{ site.time | date_to_xmlschema }}</updated>
{%- assign blog_posts = site.blog | sort: 'date' | reverse -%}
{%- for post in blog_posts limit: 20 %}
<entry>
<title type="html">{{ post.title | xml_escape }}</title>
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html"/>
<id>{{ post.url | absolute_url }}</id>
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
<author><name>{{ post.author | default: site.title | xml_escape }}</name></author>
{%- if post.blurb %}
<summary type="html">{{ post.blurb | strip | xml_escape }}</summary>
{%- else %}
<summary type="html">{{ post.excerpt | strip_html | strip | xml_escape }}</summary>
{%- endif %}
<content type="html" xml:base="{{ post.url | absolute_url }}">{{ post.content | strip | xml_escape }}</content>
</entry>
{%- endfor %}
</feed>