From 49a30d30b59c0d8bc4792357a396e6916872b882 Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 6 Aug 2025 09:43:33 -0600 Subject: [PATCH 1/3] Adds atom template with logic for multiple RSS feeds Signed-off-by: Kyle J. Davis --- content/events/_index.md | 1 + templates/atom.xml | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 templates/atom.xml diff --git a/content/events/_index.md b/content/events/_index.md index 7aa67ab6..f230f80a 100644 --- a/content/events/_index.md +++ b/content/events/_index.md @@ -2,4 +2,5 @@ title = "Events" template = "events.html" page_template = "event-page.html" +generate_feeds = true +++ diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 00000000..107ff60d --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,57 @@ +{# built from https://github.com/getzola/zola/blob/master/components/templates/src/builtins/rss.xml / MIT #} + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} + {{ config.description }} + {%- endif %} + + + + Zola + {% if last_updated is defined %}{{ last_updated | date(format="%+") }}{% endif %} + {{ feed_url | safe }} + {%- for page in pages %} + + {%- if (page.components[0] == "blog") or (section_id and section_id == page.components[0]) -%} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + {% for author in page.authors %} + + + {{ author }} + + + {% else %} + + + {%- if config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + {% endfor %} + + {{ page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% else %} + {{ page.content }} + {% endif %} + +{%- endif -%} + {%- endfor %} + \ No newline at end of file From 3e4c34af5f5a91ccfd2c75d874985bb06f670114 Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 6 Aug 2025 13:25:35 -0600 Subject: [PATCH 2/3] Update templates/atom.xml Co-authored-by: Madelyn Olson Signed-off-by: Kyle J. Davis --- templates/atom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/atom.xml b/templates/atom.xml index 107ff60d..4570b546 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -52,6 +52,6 @@ {{ page.content }} {% endif %} -{%- endif -%} + {%- endif -%} {%- endfor %} \ No newline at end of file From 42f5a54b4fc87e6835b2661152967ca39aa1469f Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Wed, 6 Aug 2025 12:51:41 -0700 Subject: [PATCH 3/3] Update templates/atom.xml Signed-off-by: Madelyn Olson --- templates/atom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/atom.xml b/templates/atom.xml index 4570b546..160088cb 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -54,4 +54,4 @@ {%- endif -%} {%- endfor %} - \ No newline at end of file +