You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does this PR change? What problem does it solve?
Adds an extend_post_content.html hook partial at a key injection point in single.html, after the post body and before the footer.
Currently, injecting custom content into single.html (e.g., quizzes, flashcard widgets, custom sections after post body) requires copying the entire layouts/_default/single.html into the project as a full override. This creates an ongoing maintenance burden — every upstream change to single.html requires a manual diff and re-merge.
This PR adds a single no-op stub partial that users can override in their own layouts/partials/ without touching the base layout:
{{- partial "extend_post_content.html" . }}
The stub ships empty (comments only), so existing sites are completely unaffected. This follows the same pattern already established by extend_head.html and extend_footer.html in PaperMod.
Was the change discussed in an issue or in the Discussions before?
I have verified that the code works as described/as intended.
This change adds a Social Icon which has a permissive license to use it.
This change does not include any CDN resources/links.
This change does not include any unrelated scripts such as bash and python scripts.
This change updates the overridden internal templates from HUGO's repository.
Commit quality assessment: The commit is solid — minimal, focused, zero-breaking-changes, and consistent with PaperMod's existing extend_head.html / extend_footer.html pattern. The stub file comments clearly explain the purpose and override mechanism. Good to go.
Thanks for the suggestion! I considered using comments.html as a hook, but it felt like the wrong trade-off — PaperMod only renders it when comments: true is set in frontmatter, which would be semantically misleading for my use case (flashcards/quiz content). It'd also create a collision point if real comment support (Disqus, utterances, etc.) is added later.
The current single.html override is minimal (two if blocks) and follows standard Hugo layout extension patterns. Keeping the concern in its own partial is cleaner than repurposing a comments hook for unrelated UI. Happy to discuss further if you see a downside I'm missing!
it is not about how minimal the change is but about how many extend templates we can add for each template which user is not wiling to override for their own convenience.
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
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.
What does this PR change? What problem does it solve?
Adds an
extend_post_content.htmlhook partial at a key injection point insingle.html, after the post body and before the footer.Currently, injecting custom content into
single.html(e.g., quizzes, flashcard widgets, custom sections after post body) requires copying the entirelayouts/_default/single.htmlinto the project as a full override. This creates an ongoing maintenance burden — every upstream change tosingle.htmlrequires a manual diff and re-merge.This PR adds a single no-op stub partial that users can override in their own
layouts/partials/without touching the base layout:{{- partial "extend_post_content.html" . }}The stub ships empty (comments only), so existing sites are completely unaffected. This follows the same pattern already established by
extend_head.htmlandextend_footer.htmlin PaperMod.Was the change discussed in an issue or in the Discussions before?
Yes. Closes #1845
PR Checklist
Commit quality assessment: The commit is solid — minimal, focused, zero-breaking-changes, and consistent with PaperMod's existing
extend_head.html/extend_footer.htmlpattern. The stub file comments clearly explain the purpose and override mechanism. Good to go.