I read the docs as well as several other support topics before adding a class and an attribute to a heading and a paragraph. The outcome is as follows:
Adding a class to a paragraph works
Adding an attribute to a paragraph works
Adding a class to a heading does not work
Adding an attribute to a heading works
Hugo environment:
hugo v0.139.3+extended+withdeploy linux/amd64 BuildDate=2024-11-29T15:36:56Z VendorInfo=brew
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.23.3"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"
Edited to make the information suitable for marking as a solution
Thanks for all the help!
For other Docsy users, this is how I changed the code. Place the following in layouts/_default/_markup/render-heading.html (create it if you don’t have it; thanks, jmooring!):