Hugo PaperMod: Make Affiliate Disclosure Configurable Per Post
This post shows how to make affiliate disclosure configurable per post in the Hugo theme PaperMod. On this blog, I used to write the disclosure directly in the article body when disclosure was required. However, copying and pasting the text every time was a hassle, so I made it easy to configure with an article parameter. Environment Windows 11 / Git Bash Hugo v0.164.0 / works with the standard build as well PaperMod v8.0 / using the latest commit at the time of writing $ hugo version hugo v0.164.0-ce2470e7012b5ab5fc4e10ebe4027e9f8d9e00dc+extended windows/amd64 BuildDate=2026-07-06T16:39:30Z VendorInfo=gohugoio $ cd themes/PaperMod && git log -1 --oneline 154d006 (HEAD -> master, origin/master, origin/HEAD) style(post-single): adjust padding for details summary element Installation steps 1. Create a custom layout Copy themes/PaperMod/layouts/single.html to layouts/single.html. ...