First version of replacing hugo-atom-feed (issue #714) - #715
Conversation
❌ Deploy Preview for scientific-python-hugo-theme failed.Built without sensitive environment variables
|
agriyakhetarpal
left a comment
There was a problem hiding this comment.
Wow, thanks @kreczko! I think it is great to have our own RFC 4287 support. The Pixi integration is also nice, which we've discussed on a few occasions before, but I haven't gotten around to implementing it.
However, in my humble opinion, I don't believe this repository is the best place to introduce this code, as such. Rather, it would be better if this could be hosted on your GitHub account or elsewhere. We could then rely on your work by adding it as a submodule in the repository, just like the current means of integration of hugo-atom-feed. I think it will be fine to mention there that the Atom feed provided only works for features desired by the https://github.com/scientific-python/scientific-python-hugo-theme repository, and that you can consider adding more features provided there is interest and provided you are willing to maintain it going forward.
The reason is that this is a lot of code, and it will be something that will be tricky for us to maintain going forward, if we were to add it. I know this layout is unlikely to change often, but the premise of these extra tests and related test scaffolding to run just for the sake of Atom feed support does not give me confidence that we will be able to maintain them.
Similarly, adding Pixi and a lockfile is also desirable, but it needs to be its own PR instead, as you suggest.
Fixes #714
RFC 4287 implementation of a Atom hugo template
The in-tree Atom template follows RFC 4287 by providing:
title,id,updated, andauthor.title,id, andupdated.subtitle,generator,published, categories, language, HTML content, andself/alternatelinks.Tests cover XML validity, required element cardinality, metadata values, entry ordering and limits, RFC 3339 dates, HTML escaping, categories, author fallback, empty feeds, and discovery links.
AI assistance
AI tools were used to:
The resulting implementation and generated output were reviewed and validated through the repository’s test suite.
Other notes
This is intentionally a basic implementation, focused on the core requirements of RFC 4287 and the features currently used by the Scientific Python blog feed.
Additional behaviour such as per-entry authors, related-post links, tracking parameters, or multilingual links can be added in response to concrete use cases and review feedback.
Pixi was introduced to provide a reproducible, pinned Hugo and Dart Sass environment for these tests. It also avoids installation-specific behaviour such as Snap confinement (my dev machine) and could be reused by other theme tests and development tasks. It proved convenient here, but the change is not essential to the Atom implementation and can be removed if maintainers would prefer to keep the existing tooling.