Skip to content

Limit the home feed to the site's main sections - #1

Merged
kreczko merged 1 commit into
FAST-HEP:mainfrom
agriyakhetarpal:feed-sections
Sep 16, 2026
Merged

kreczko merged 1 commit into
FAST-HEP:mainfrom
agriyakhetarpal:feed-sections

Conversation

@agriyakhetarpal

Copy link
Copy Markdown
Contributor

Hi! This PR limits the home feed to pages in the site's main sections, with a mechanism to override this via params.atom.sections.

The idea is that the home feed lists every page on the site, which means that a blog website that also has, say, "About" pages or "Author" pages displays them to the subscribers of the feed. In scientific-python/blog.scientific-python.org#274 (where I'm trying to update to our v0.23 release which includes your layout!), doing so adds eight entries that are not posts, and did not exist on the previous atom feed. That is, the previous hugo-atom-feed template (https://github.com/kaushalmodi/hugo-atom-feed) limited the home feed to feedSections, with a fallback to mainSections.

The home feed now defaults to site.MainSections, which Hugo derives from the section with the most pages and which a site can pin with the top-level mainSections setting. The params.atom.sections configuration option can be used to override the list. If someone sets this to ["*"], it includes every page (for sites that have a top-level blog or have posts scattered across various sections).

Thank you!

@agriyakhetarpal

agriyakhetarpal commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @kreczko, may I trouble you to look at this PR whenever you have a chance? I figured I'd ping you, since I saw that no one was watching the repository (publicly, at least). :) Thanks a lot!

@kreczko

kreczko commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Hi @agriyakhetarpal, thank you for the contribution and apologies for the delay.
Looks good to me, happy to merge.

@kreczko
kreczko merged commit bdfb221 into FAST-HEP:main Sep 16, 2026
1 check passed
@agriyakhetarpal

Copy link
Copy Markdown
Contributor Author

No worries; it was a Friday anyway! Thank you for the prompt merge!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants