mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
15 hours ago a9294ae4c2e10b2c0d313dcfd6f0f3d520452f57
refs
author Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Thursday, November 19, 2026 10:19 +0100
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Friday, November 20, 2026 00:10 +0100
commita9294ae4c2e10b2c0d313dcfd6f0f3d520452f57
tree bab26fa93354296f0a7a2045e8fedeea950f532a tree | zip | gz
parent 1ee56aef36b3b4e902c8b5b832d732a680b8610a view | diff
feat(layouts): deprecate overriding the header partials

Overriding site-header.html, page-header.html, or site-navigation.html
in a site project still works, but prints a deprecation notice. Sites
should use the header hooks and [params.ananke.header] instead. The
override support is removed in v3 (#1120).

The theme versions of these partials set a marker in the page store.
func/header/IncludeChecked.html includes a partial and prints the
notice if the marker is missing, so only sites that override a partial
see it. Hugo prints the notice once per build, and a site can suppress
it with ignoreLogs = ['ananke-deprecated-<partial>'].

func/debug-cli.html gets the `deprecated` severity: it always prints,
whatever the hook verbosity is, in the warning colour with the label
DEPR. With the new `id` parameter, messages are logged with warnidf or
erroridf, so they can be suppressed.

Every place that exists only for this deprecation has a comment in the
format `@deprecated 2.21.0 remove in 3.0.0: <task> (see #1120)`, so
`grep -rn "@deprecated" layouts` finds them all for v3.
9 files modified
1 files added
203 ■■■■■ changed files
layouts/404.html 5 ●●●●● diff | view | raw | blame | history
layouts/_partials/func/debug-cli.html 39 ●●●●● diff | view | raw | blame | history
layouts/_partials/func/header/IncludeChecked.html 30 ●●●●● diff | view | raw | blame | history
layouts/_partials/page-header.html 8 ●●●●● diff | view | raw | blame | history
layouts/_partials/site-header.html 8 ●●●●● diff | view | raw | blame | history
layouts/_partials/site-navigation.html 2 ●●●●● diff | view | raw | blame | history
layouts/baseof.html 3 ●●●●● diff | view | raw | blame | history
layouts/page/single.html 5 ●●●●● diff | view | raw | blame | history
layouts/single.html 3 ●●●●● diff | view | raw | blame | history
scripts/test-hugo-quickstart.ts 100 ●●●●● diff | view | raw | blame | history