{{- /* Renders one header component through the hook system. For a component named ``, this fires three hooks in order: - `header/-before` (empty by default; add your own markup) - `header/` (the component itself; the theme ships defaults for logo, languages, menu, social, title, and description) - `header/-after` (empty by default; add your own markup) Each hook partial lives in `layouts/_partials/hooks/header/` and receives the header context dictionary: - `page` the current page - `region` "navigation" or "content" - `featured_image` the featured image URL of the page, or an empty string - `variant` "site" or "page" (content region only) - `classes` navigation classes from func/header/GetNavigationClasses.html (navigation region only) @param name string Component name. @param context map Header context dictionary (see above). */ -}} {{- $name := .name -}} {{- $context := .context -}} {{- partials.Include "hook.html" (collections.Dictionary "hook" (fmt.Printf "header/%s-before" $name) "context" $context) -}} {{- partials.Include "hook.html" (collections.Dictionary "hook" (fmt.Printf "header/%s" $name) "context" $context) -}} {{- partials.Include "hook.html" (collections.Dictionary "hook" (fmt.Printf "header/%s-after" $name) "context" $context) -}}