mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-07 05:18:40 -04:00
photos properly included in RSS and Atom feed
This commit is contained in:
parent
792646c68d
commit
b106d42f4d
4 changed files with 111 additions and 2 deletions
42
templates/rss.xml
Normal file
42
templates/rss.xml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{% import "macros/feed.html" as feed_macros %}
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title>{{ config.title }}
|
||||
{%- if term %} - {{ term.name }}
|
||||
{%- elif section.title %} - {{ section.title }}
|
||||
{%- endif -%}
|
||||
</title>
|
||||
<link>
|
||||
{%- if section -%}
|
||||
{{ section.permalink | escape_xml | safe }}
|
||||
{%- else -%}
|
||||
{{ config.base_url | escape_xml | safe }}
|
||||
{%- endif -%}
|
||||
</link>
|
||||
<description>{{ config.description }}</description>
|
||||
<generator>Zola</generator>
|
||||
<language>{{ lang }}</language>
|
||||
<atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/>
|
||||
{% if last_updated is defined %}<lastBuildDate>{{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>{% endif %}
|
||||
{%- for page in pages %}
|
||||
<item>
|
||||
<title>{{ page.title }}</title>
|
||||
<pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
|
||||
<author>
|
||||
{%- if page.authors -%}
|
||||
{{ page.authors[0] }}
|
||||
{%- elif config.author -%}
|
||||
{{ config.author }}
|
||||
{%- else -%}
|
||||
Unknown
|
||||
{%- endif -%}
|
||||
</author>
|
||||
<link>{{ page.permalink | escape_xml | safe }}</link>
|
||||
<guid>{{ page.permalink | escape_xml | safe }}</guid>
|
||||
<description xml:base="{{ page.permalink | escape_xml | safe }}">{{ feed_macros::content(page=page) }}</description>
|
||||
</item>
|
||||
{%- endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
Loading…
Add table
Add a link
Reference in a new issue