From 4294ca098c880072772616a1b3a6d7ae3834128b Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 13 Jan 2024 13:33:30 +0100 Subject: [PATCH] fix: Fix the Atom feed --- config.toml | 2 +- content/_index.md | 2 -- content/developers.md | 1 - templates/base.html | 2 +- templates/blog.html | 2 +- templates/feed.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 templates/feed.xml diff --git a/config.toml b/config.toml index 97a5e78..f2bbdcb 100644 --- a/config.toml +++ b/config.toml @@ -5,7 +5,7 @@ description = "A modern XMPP client" compile_sass = false build_search_index = false generate_feed = true -feed_filename = "atom.xml" +feed_filename = "feed.xml" [extra] heroText = "An experimental and modern XMPP client" diff --git a/content/_index.md b/content/_index.md index 30d22b8..97c1129 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,3 @@ +++ template = "index.html" - -sort_by = "date" +++ \ No newline at end of file diff --git a/content/developers.md b/content/developers.md index 34584d9..ab13d56 100644 --- a/content/developers.md +++ b/content/developers.md @@ -1,5 +1,4 @@ +++ title = "Developer Information" template = "developers.html" -date = "2024-01-13" +++ \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 568459a..2706254 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,7 +5,7 @@ - + {% if page %} diff --git a/templates/blog.html b/templates/blog.html index a4c1fe5..d50c02d 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -6,7 +6,7 @@

Blog posts

- + diff --git a/templates/feed.xml b/templates/feed.xml new file mode 100644 index 0000000..a6f08d8 --- /dev/null +++ b/templates/feed.xml @@ -0,0 +1,40 @@ + + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + + {%- if section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + + {{ config.description }} + Zola + {{ lang }} + + {{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }} + + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + {{ page.permalink | escape_xml | safe }} + {{ page.permalink | escape_xml | safe }} + {{ page.content }} + + {%- endfor %} + + \ No newline at end of file