diff options
Diffstat (limited to 'src/themes/serene/templates/feed.xml')
| -rw-r--r-- | src/themes/serene/templates/feed.xml | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/themes/serene/templates/feed.xml b/src/themes/serene/templates/feed.xml index fe1f139..00aebe5 100644 --- a/src/themes/serene/templates/feed.xml +++ b/src/themes/serene/templates/feed.xml @@ -1,32 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}"> - <title>{% if section.title %}{{ section.title }}{% else %}{{ config.title }}{% endif %}</title> - {%- if section.description %} + <title>{% if section is defined and section.title %}{{ section.title }}{% else %}{{ config.title }}{% endif %}</title> + {%- if section is defined and section.description %} <subtitle>{{ section.description }}</subtitle> {%- elif config.description %} <subtitle>{{ config.description }}</subtitle> {%- endif %} - <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/> - <link href=" - {%- if section -%} - {{ section.permalink | escape_xml | safe }} - {%- else -%} - {{ config.base_url | escape_xml | safe }} - {%- endif -%} - "/> - <updated>{{ last_updated | date(format="%+") }}</updated> + <link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}"/> + <link rel="alternate" type="text/html" href=" + {%- if section is defined -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + "/> + {% if last_updated is defined %} + <updated>{{ last_updated | date(format="%Y-%m-%dT%H:%M:%S%:z") }}</updated> + {% endif %} <id>{{ feed_url | safe }}</id> {%- for page in pages %} <entry xml:lang="{{ page.lang }}"> <title>{{ page.title }}</title> - <published>{{ page.date | date(format="%+") }}</published> - <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated> - {%- if page.summary %} - <summary>{{ page.summary }}</summary> - {%- endif %} - <link href="{{ page.permalink | safe }}" type="text/html"/> + <published>{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}</published> + <updated>{{ (page.updated or page.date) | date(format="%Y-%m-%dT%H:%M:%S%:z") }}</updated> + <link rel="alternate" type="text/html" href="{{ page.permalink | safe }}"/> <id>{{ page.permalink | safe }}</id> - <content type="html">{{ page.content }}</content> + {% if page.summary %} + <summary>{{ page.summary }}</summary> + {% endif %} + <content type="html" xml:base="{{ page.permalink | escape_xml | safe }}">{{ page.content }}</content> </entry> {%- endfor %} -</feed>
\ No newline at end of file +</feed> |
