Skip to content

First version of replacing hugo-atom-feed (issue #714) - #715

Open
kreczko wants to merge 14 commits into
scientific-python:mainfrom
kreczko:kreczko-issue-714
Open

First version of replacing hugo-atom-feed (issue #714)#715
kreczko wants to merge 14 commits into
scientific-python:mainfrom
kreczko:kreczko-issue-714

Conversation

@kreczko

@kreczko kreczko commented Aug 11, 2026

Copy link
Copy Markdown

Fixes #714

RFC 4287 implementation of a Atom hugo template

The in-tree Atom template follows RFC 4287 by providing:

  • Required feed metadata: title, id, updated, and author.
  • Required entry metadata: title, id, and updated.
  • Optional metadata: subtitle, generator, published, categories, language, HTML content, and self/alternate links.
  • Valid empty feeds, stable timestamps, feed-size limits, and HTML feed discovery.

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:

  • help interpret the requirements of RFC 4287;
  • help design tests for specific RFC 4287 requirements and edge cases;
  • assist with debugging template-rendering and test failures.
  • to make my notes readable for this PR

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.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for scientific-python-hugo-theme failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit aa2dd47
🔍 Latest deploy log https://app.netlify.com/projects/scientific-python-hugo-theme/deploys/6a7b56f3e25b680008d2d3fb

@agriyakhetarpal agriyakhetarpal added the type: Enhancement New feature or request label Aug 11, 2026

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updating to Hugo 0.156.0 and later: site.Author broken, what to do with Atom feeds, and so on

2 participants