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

Patrick Kollitsch
16 hours ago 0ef56834cd28c15183d63d6f84d642233062cbf6
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 00:10 +0100
commit0ef56834cd28c15183d63d6f84d642233062cbf6
tree 6968a4adb51fe10eb78c2fa1736b87323e708744 tree | zip | gz
parent 96eb5778e6af375f5d4e07570e4ff649c6a7f08f 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