Advertise Atom/RSS feeds from the HTML head - #718
Open
agriyakhetarpal wants to merge 4 commits into
Open
agriyakhetarpal wants to merge 4 commits into
agriyakhetarpal wants to merge 4 commits into
Conversation
✅ Deploy Preview for scientific-python-hugo-theme ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
stefanv
reviewed
Sep 11, 2026
| <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ $.Site.Title }}"> | ||
| {{ end -}} | ||
| {{ if not .IsHome -}} | ||
| {{ range site.Home.AlternativeOutputFormats -}} |
Member
There was a problem hiding this comment.
I guess we may see some duplication here if both the page and site settings provide alternatives?
Member
Author
There was a problem hiding this comment.
I think we can do something like having the page-level link having the page title, and the site-wide link having the site title. I guess that would work?
See 037aa3d
Member
There was a problem hiding this comment.
Can also do a join, like site name — page name or similar.
Member
Author
There was a problem hiding this comment.
Right; good idea. Sphinx also does that. Let's do it. :)
Co-Authored-By: Stefan van der Walt <45071+stefanv@users.noreply.github.com>
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.

This PR changes our layout to emit
<link rel="alternate">tags for every alternative output format of the current page, plus the home page's formats on all other pages. This lets feed readers autodiscover the Atom feed from any page on a site that uses our theme.This is a bug in my view, since https://github.com/FAST-HEP/hugo-atom-layout does this via its own
partials/head.html, but our partial took precedence and shadowed that partial.Note that those websites that don't disable RSS will now also advertise Hugo's default
index.xml.