Repository navigation
Limit the home feed to the site's main sections - #1
Merged
Merged
Conversation
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! |
Contributor
|
Hi @agriyakhetarpal, thank you for the contribution and apologies for the delay. |
Contributor
Author
|
No worries; it was a Friday anyway! Thank you for the prompt merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomainSections.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. Theparams.atom.sectionsconfiguration 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!