From ea30ac77b60642d691a0508af5eb005186cf2851 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 20 Jun 2023 18:28:42 +0200 Subject: Add styling to Atom feed --- templates/atom.xml | 48 +++++++++++++++++++++++++++++ templates/feed-styles.html | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 templates/atom.xml create mode 100644 templates/feed-styles.html (limited to 'templates') diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..3fd5dee --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,48 @@ + + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} + {{ config.description }} + {%- endif %} + + + Zola + {{ last_updated | date(format="%+") }} + {{ feed_url | safe }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + + + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + + {{ page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% else %} + {{ page.content }} + {% endif %} + + {%- endfor %} + diff --git a/templates/feed-styles.html b/templates/feed-styles.html new file mode 100644 index 0000000..a6cae59 --- /dev/null +++ b/templates/feed-styles.html @@ -0,0 +1,77 @@ + + + + + + + + RSS Feed | + <xsl:value-of select="/atom:feed/atom:title"/> + + + + + {% include "style.html" ignore missing -%} + + +
+
+ This is an RSS feed. Subscribe by copying + the URL from the address bar into your newsreader. Visit + About Feeds + to learn more and get started. It's free. +
+
+

+ + + + + + + + + + RSS Feed Preview | + + + +

+ + +
+
+ + +
+
-- cgit 1.4.1