What you'd like to propose?
Problem
I need to inject custom content into single.html (e.g., after post content, before the footer), the only option that I have is to copy the entire layouts/_default/single.html into their project and maintain it as an override.
This creates a maintenance burden: every time PaperMod updates single.html, I have to manually diff and re-apply their customizations — or risk falling behind on upstream improvements.
Proposed Solution
Add no-op hook partials at key injection points in single.html that users can override in their own layouts/partials/ without touching the base layout.
Example hooks in single.html:
{{/* Hook: users override this partial to inject content after post body */}}
{{- partial "extend_post_content.html" . }}
Ship them as empty stubs in PaperMod:
layouts/partials/extend_post_content.html → empty
Real-World Use Case
I maintain a quiz and flashcard system. I inject two partials after the post body, but must override the full single.html to do so. With an extend_post_content.html hook, I could drop the layout override entirely.
Suggested Hook Locations
| Hook partial |
Position |
layouts/partials/extend_post_content.html |
After content, before footer |
Impact
Zero breaking changes — existing sites unaffected. Eliminates the most common reason users override single.html
Code of Conduct
What you'd like to propose?
Problem
I need to inject custom content into
single.html(e.g., after post content, before the footer), the only option that I have is to copy the entirelayouts/_default/single.htmlinto their project and maintain it as an override.This creates a maintenance burden: every time PaperMod updates
single.html, I have to manually diff and re-apply their customizations — or risk falling behind on upstream improvements.Proposed Solution
Add no-op hook partials at key injection points in
single.htmlthat users can override in their ownlayouts/partials/without touching the base layout.Example hooks in
single.html:{{/* Hook: users override this partial to inject content after post body */}} {{- partial "extend_post_content.html" . }}Ship them as empty stubs in PaperMod:
Real-World Use Case
I maintain a quiz and flashcard system. I inject two partials after the post body, but must override the full
single.htmlto do so. With anextend_post_content.htmlhook, I could drop the layout override entirely.Suggested Hook Locations
layouts/partials/extend_post_content.htmlImpact
Zero breaking changes — existing sites unaffected. Eliminates the most common reason users override
single.htmlCode of Conduct