From 3b6e441d487c181954974d9f296854ed72ee1771 Mon Sep 17 00:00:00 2001 From: lynxize Date: Thu, 17 Apr 2025 21:46:59 -0600 Subject: [PATCH] fix atom feed --- config.toml | 3 ++- content/blog/_index.md | 6 +++++- templates/atom.xml | 49 ++++++++++++++++++++++++++++++++++++++++++ templates/base.html | 1 + 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 templates/atom.xml diff --git a/config.toml b/config.toml index 1c8308b..9fa9fd1 100644 --- a/config.toml +++ b/config.toml @@ -4,8 +4,9 @@ base_url = "https://lynxize.dev" compile_sass = false build_search_index = false -generate_feeds = false # need to configure it to be at /blog/atom.xml which takes Work(tM) +generate_feeds = false # set to true in the blog _index +author="lynxize" [markdown] highlight_code = true diff --git a/content/blog/_index.md b/content/blog/_index.md index 1a84467..13c2ace 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -3,4 +3,8 @@ title = "Various Ramblings" sort_by = "date" template = "blog.html" page_template = "post.html" -+++ \ No newline at end of file + +generate_feeds = true ++++ + +Some random blog posts/ramblings/text walls of mine. \ No newline at end of file diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..39b6099 --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,49 @@ + + + {{ config.author }} + {%- 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="%+") }} + {% 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 %} + + {%- endfor %} + \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 2706d01..c652674 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,6 +20,7 @@ blog stuff +