mirror of
https://github.com/ahoneybun/ahoneybun.net.git
synced 2025-05-12 03:04:02 -06:00
Create feed.xml
This commit is contained in:
parent
005f162549
commit
04512297c5
1 changed files with 32 additions and 0 deletions
32
templates/feed.xml
Normal file
32
templates/feed.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?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 %}
|
||||
<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>
|
||||
<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"/>
|
||||
<id>{{ page.permalink | safe }}</id>
|
||||
<content type="html">{{ page.content }}</content>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
Loading…
Add table
Add a link
Reference in a new issue