kaxil opened a new pull request, #1336: URL: https://github.com/apache/airflow-site/pull/1336
Fix footer rendering by moving our overrides to Hugo v0.146+’s `_partials` path so they actually override Docsy’s footer and hooks. ## Why This repo builds with **Hugo v0.146.0** (see CI). In Hugo v0.146.0’s new template system, **`layouts/partials/` is renamed to `layouts/_partials/`** ([Hugo: New template system in v0.146.0](https://gohugo.io/templates/new-templatesystem-overview/)). Any `layouts/<dir>` **not** starting with `_` is treated as the root of a **Page path**, not a special template bucket ([same doc](https://gohugo.io/templates/new-templatesystem-overview/)). As a result, `landing-pages/site/layouts/partials/footer.html` was not being used to override the theme footer. Docsy’s default footer (minimal) was rendered instead. ## What changed - Add/keep overrides at the correct Hugo v0.146+ locations: - `landing-pages/site/layouts/_partials/footer.html` - `landing-pages/site/layouts/_partials/hooks/head-end.html` - Remove redundant/unused legacy locations: - `landing-pages/site/layouts/partials/footer.html` - `landing-pages/site/layouts/partials/hooks/head-end.html` ## Rule of thumb (Hugo >= 0.146.0) - Use `layouts/_partials/...` for reusable partials. - Use `layouts/_shortcodes/...` for shortcodes. - Treat `layouts/<dir-without-leading-_>/...` as Page-path scoped templates (e.g. `layouts/docs/...`) ([Hugo: New template system in v0.146.0](https://gohugo.io/templates/new-templatesystem-overview/)). - When overriding a theme template, mirror the theme’s **relative path** under `layouts/` (project wins only when the relative path matches): - [Hugo: Template lookup order](https://gohugo.io/templates/lookup-order/) ## Related Docsy references - Docsy docs: injecting code via hook partials `hooks/head-end.html` / `hooks/body-end.html` ([Docsy: Look and Feel → Customizing templates](https://www.docsy.dev/docs/content/lookandfeel/)) - Docsy theme sources (for context on what we’re overriding): - Footer partial: https://github.com/google/docsy/blob/v0.12.0/layouts/_partials/footer.html - Head hook placeholder: https://github.com/google/docsy/blob/v0.12.0/layouts/_partials/hooks/head-end.html <img width="1705" height="851" alt="image" src="https://github.com/user-attachments/assets/ab726aa5-ff71-41ab-8e8f-570ed1208507" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
