From 37b82b260b22a2484b37aef3a98e9aecb4e073c9 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 30 May 2025 10:33:06 +0200 Subject: [PATCH] Add atom feed --- README.md | 3 +-- _includes/default_head_tags.html | 4 ++- atom.xml | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 atom.xml diff --git a/README.md b/README.md index 605968e..552ed91 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ A list of things to check once in a while to make sure I haven't broken them ina - add humans.txt https://humanstxt.org/ - fix the OG tags so that https://cards-dev.twitter.com/validator works - consider switching to using pandoc as a markdown renderer - - setup webmentions https://aarongustafson.github.io/jekyll-webmention_io/ - - add a theme toggle button: https://whitep4nth3r.com/blog/best-light-dark-mode-theme-toggle-javascript/ + - make the light dark mode toggle work without js - make sure the above works with the thesis section, will probably require stripping the html tag. - add json-ld metadata https://csvbase.com/blog/13 diff --git a/_includes/default_head_tags.html b/_includes/default_head_tags.html index 0cc0093..d5d87db 100644 --- a/_includes/default_head_tags.html +++ b/_includes/default_head_tags.html @@ -130,7 +130,9 @@ Stay a while, poke around, there might be some easter eggs to be found.`, -{% feed_meta %} + + + {% if layout.head %} {{ layout.head }} diff --git a/atom.xml b/atom.xml new file mode 100644 index 0000000..918f85c --- /dev/null +++ b/atom.xml @@ -0,0 +1,42 @@ +--- +layout: none +--- + + + Jekyll + + {{site.time | date_to_xmlschema }} + {{ page.url | absolute_url | xml_escape }} + + Tom Hodson's Atom Feed + {{ site.description | xml_escape }} + + {{"/favicon.ico" | absolute_url | xml_escape }} + {{ "/apple-touch-icon.png" | absolute_url | xml_escape }} + + + Tom Hodson + {{ site.url | xml_escape }} + + {% assign feed_items = site.feed.post_limit | default: 10 %} + {% for post in site.posts limit:feed_items %} + {% if post.draft == false or jekyll.environment == "development" %} + {% unless post.exclude_from_rss %} + + {% assign post_title = post.title | smartify | strip_html | normalize_whitespace | xml_escape %} + {{ post_title }} + + {{ post.date | date_to_xmlschema }} + {{ post.last_modified_at | default: post.date | date_to_xmlschema }} + {{ post.id | absolute_url | xml_escape }} + + + {% if post.social_image %} + + + {% endif %} + + {% endunless %} + {% endif %} + {% endfor %} + \ No newline at end of file