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

Patrick Kollitsch
yesterday c82830c6c5faac18992b7b0a576faf2fdf917339
refs
author Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Thursday, November 19, 2026 09:40 +0100
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Friday, November 20, 2026 09:03 +0100
commitc82830c6c5faac18992b7b0a576faf2fdf917339
tree 06d559872a75502030ded9830ff33e348ac6bbb3 tree | zip | gz
parent a16dc872e99ba95ffb9bd18876908194a3182c89 view | diff
refactor(layouts): render header parts through hooks

Render every part of the site header (logo, languages, menu, social
links, title, and description) through header/<name> hooks. The theme
ships default hook partials that produce the same markup as before.

Each component also fires header/<name>-before and header/<name>-after
hooks, so sites can add markup (for example a search form or a second
menu) between components without overriding the templates.
3 files modified
13 files added
392 ■■■■■ changed files
layouts/_partials/func/header/GetMenuCurrent.html 15 ●●●●● diff | view | raw | blame | history
layouts/_partials/func/header/GetNavigationClasses.html 31 ●●●●● diff | view | raw | blame | history
layouts/_partials/header/component.html 30 ●●●●● diff | view | raw | blame | history
layouts/_partials/header/content.html 12 ●●●●● diff | view | raw | blame | history
layouts/_partials/header/menu-toggle-icon.html 2 ●●●●● diff | view | raw | blame | history
layouts/_partials/header/submenu-icon.html 2 ●●●●● diff | view | raw | blame | history
layouts/_partials/header/submenu.html 27 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/description.html 23 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/languages.html 5 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/logo.html 12 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/menu.html 49 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/social.html 5 ●●●●● diff | view | raw | blame | history
layouts/_partials/hooks/header/title.html 15 ●●●●● diff | view | raw | blame | history
layouts/_partials/page-header.html 7 ●●●●● diff | view | raw | blame | history
layouts/_partials/site-header.html 19 ●●●●● diff | view | raw | blame | history
layouts/_partials/site-navigation.html 138 ●●●●● diff | view | raw | blame | history