Compare commits

..

2 Commits

Author SHA1 Message Date
Tom
37b82b260b Add atom feed 2025-05-30 10:33:06 +02:00
Tom
536f7e5b1d Remove old deps 2025-05-30 10:32:53 +02:00
5 changed files with 47 additions and 12 deletions

View File

@ -5,10 +5,7 @@ source "https://rubygems.org"
gem 'jekyll', '~> 4.2'
group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-redirect-from'
gem 'jekyll_flexible_include'
# gem "kramdown-syntax-coderay", "~> 1.0"
gem "jekyll-last-modified-at"
end

View File

@ -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

View File

@ -30,17 +30,12 @@ kramdown:
wrap: span
flexible_include:
die_on_flexible_include_error: false
include:
- node_modules
plugins:
# - jekyll-feed
- jekyll-redirect-from
- flexible_include
# - kramdown-syntax-coderay
- jekyll-last-modified-at

View File

@ -130,7 +130,9 @@ Stay a while, poke around, there might be some easter eggs to be found.`,
</script>
<!-- RSS feed -->
{% feed_meta %}
<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="Tom Hodson's RSS Feed" />
<link rel="alternate" type="application/feed+json" href="/feed.json" title="Tom Hodson's JSON Feed" />
<link rel="alternate" type="application/atom+xml" href="/atom.xml" title="Tom Hodson's ATOM Feed" />
{% if layout.head %}
{{ layout.head }}

42
atom.xml Normal file
View File

@ -0,0 +1,42 @@
---
layout: none
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" hreflang="en" />
<updated>{{site.time | date_to_xmlschema }}</updated>
<id>{{ page.url | absolute_url | xml_escape }}</id>
<title type="html">Tom Hodson's Atom Feed</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<icon>{{"/favicon.ico" | absolute_url | xml_escape }}</icon>
<logo>{{ "/apple-touch-icon.png" | absolute_url | xml_escape }}</logo>
<author>
<name>Tom Hodson</name>
<uri>{{ site.url | xml_escape }}</uri>
</author>
{% 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 %}
<entry xml:lang="en">
{% assign post_title = post.title | smartify | strip_html | normalize_whitespace | xml_escape %}
<title type="html">{{ post_title }}</title>
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post_title }}" />
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
<id>{{ post.id | absolute_url | xml_escape }}</id>
<summary type="html"><![CDATA[{{ post.excerpt | strip_html | normalize_whitespace }}]]></summary>
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip }}]]></content>
{% if post.social_image %}
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="{{ post.social_image | absolute_url | xml_escape }}" />
<media:content medium="image" url="{{ post.social_image | absolute_url | xml_escape }}" xmlns:media="http://search.yahoo.com/mrss/" />
{% endif %}
</entry>
{% endunless %}
{% endif %}
{% endfor %}
</feed>