Merged
Conversation
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
bradcray
approved these changes
Feb 2, 2026
Member
bradcray
left a comment
There was a problem hiding this comment.
Thanks for walking me through this interactively, Daniel!
bradcray
added a commit
to chapel-lang/chapel-www
that referenced
this pull request
Feb 3, 2026
--- Signed-off-by: Brad Chamberlain <bradcray@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.
Discussed in more detail in the Hugo issue I opened: gohugoio/hugo#14455 (comment)
Essentially, we were seeing that Hugo would tag list pages as having mathematics, even though it was the pages that were being included in the list that actually had math. I believed it was doing so erroneously, and indeed it was; due to gohugoio/hugo#9692, the page context was not being given by our
detailsandsummarytemplates to markdown rendering, causing mathematics render hooks to receive the global page as their context. This would get tagged with thehasMathtag.This PR fixes that, which causes the
hasMathtag to be unset for list pages...Except, as pointed out by Joe in the Hugo thread, the un-buggy behavior is undesirable, because if the summarized page has math in its summary, this will result in the list page not having the KaTeX CSS even though it needs it. Thus, in this case, the behavior we saw was actually helpful. This PR thus also explicitly propagates
hasMathto the page that calls.Summary. This seems to match the previously accidental behavior -- though, I suspect, this is not sufficient, and further investigation is needed, because right now, even pages on the front page have math, but only the 3rd pagination page onwards is tagged with KaTeX CSS.In any case, for the time being this is not an issue since our page summaries do not have math in then.
Reviewed by @bradcray -- thanks!