Skip to content

Migrate to Hugo v0.146.0+ new template system#2891

Closed
EricGusmao wants to merge 1 commit intonunocoracao:mainfrom
EricGusmao:feat/hugo-v0.146-new-template-system
Closed

Migrate to Hugo v0.146.0+ new template system#2891
EricGusmao wants to merge 1 commit intonunocoracao:mainfrom
EricGusmao:feat/hugo-v0.146-new-template-system

Conversation

@EricGusmao
Copy link
Copy Markdown
Contributor

Fixes #2785

Migrates Blowfish to Hugo's new template system introduced in v0.146.0. See the Hugo new template system overview for details.

Summary

  • Restructures layouts/ to comply with Hugo v0.146.0+'s new template system: removes _default/, renames partials/_partials/, shortcodes/_shortcodes/, and promotes render hooks to _markup/
  • Renames index.htmlhome.html, terms.htmltaxonomy.html, and index.jsonhome.json to match new Hugo page-kind template naming
  • Replaces deprecated {{ template "_internal/opengraph.html" }} / {{ template "_internal/twitter_cards.html" }} calls with {{ partial "..." }}, and updates all templates.Exists / printf paths from "partials/..." to "_partials/..."
  • Applies the same _partials/ / _shortcodes/ renames to exampleSite/layouts/
  • Bumps minimum Hugo version in config.toml to 0.146.0

- Move layouts/_default/* to layouts/ root
- Rename layouts/partials/ → layouts/_partials/
- Rename layouts/shortcodes/ → layouts/_shortcodes/
- Rename layouts/index.html → layouts/home.html
- Rename layouts/_default/terms.html → layouts/taxonomy.html
- Rename layouts/_default/index.json → layouts/home.json
- Move layouts/_default/_markup/ → layouts/_markup/
- Migrate exampleSite/layouts/ partials and shortcodes folders
- Replace {{ template "_internal/..." }} with {{ partial "..." }}
- Update all templates.Exists and printf paths from "partials/" to "_partials/"
- Bump minimum Hugo version to 0.146.0 in config.toml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@EricGusmao EricGusmao requested a review from nunocoracao as a code owner April 7, 2026 14:32
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 7, 2026

Deploy Preview for snazzy-dango-efb2ec ready!

Name Link
🔨 Latest commit ea4af71
🔍 Latest deploy log https://app.netlify.com/projects/snazzy-dango-efb2ec/deploys/69d5158843c5b300085ec377
😎 Deploy Preview https://deploy-preview-2891--snazzy-dango-efb2ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nunocoracao
Copy link
Copy Markdown
Owner

Thanks for working on this! Unfortunately, this PR introduces breaking changes for existing users — anyone who overrides partials (e.g. layouts/partials/extend-footer.html, layouts/partials/extend-head.html, layouts/partials/favicons.html, etc.) would have their customizations silently stop working after upgrading. We don't accept breaking changes unless they're strictly required to keep supporting the project (e.g. a dependency deprecating a feature we rely on). Hugo's new template system with _partials is supported but the old partials path still works, so this migration isn't required yet. If Hugo ever removes support for the old paths, we'd revisit this. Thanks for understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature|FutureBug]: Migrate to Hugo's "new template system" (v0.146.0+)

2 participants