-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What you'd like to propose?
Hi!
In the latest version of PaperMod, the following templates are referenced inside _partials/head.html:
{{ template "partials/templates/opengraph.html" . }}
{{ template "partials/templates/twitter_cards.html" . }}
{{ template "partials/templates/schema_json.html" . }}
However, these templates are not defined in the theme (using {{ define ... }}), which causes the Hugo build to fail in production mode:
Error: html/template:_partials/head.html:155:13: no such template "partials/templates/twitter_cards.html"
This is especially confusing because it only triggers in production (i.e., hugo.IsProduction == true), so users upgrading from an older version may not notice the issue until CI breaks.
Suggested Fix:
- Provide empty stub templates for these in layouts/partials/templates/, e.g.:
{{ define "partials/templates/twitter_cards.html" }}{{ end }}
That way, users can override them if needed, but the build won’t fail by default.
Thanks for the great theme!
Code of Conduct
- I agree to follow this project's Code of Conduct
aaronriekenberg, jamesnulliu, sammcj and rednafisakanate, chkuendig, talesmgodois, aricodes-oss, TonyDS2022 and 8 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working