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

Patrick Kollitsch
10 hours ago c70b22c0c65d21fc25eda46a8182eb042da11da0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{{- /*
  Header content below the navigation bar.
 
  The components and their order come from `ananke.header.content` (page front
  matter or site parameters). The default is the title and the description of
  the page. Every component is rendered through the header hooks (see
  `header/component.html`).
 
  @param page            page    The current page.
  @param variant         string  "site" (list pages) or "page" (single pages).
  @param featured_image  string  Featured image URL, or an empty string.
*/ -}}
{{- $header := collections.Merge . (collections.Dictionary "region" "content") -}}
{{- $components := .page.Param "ananke.header.content" | compare.Default (collections.Slice "title" "description") -}}
{{- range $components }}
{{ partials.Include "header/component.html" (collections.Dictionary "name" . "context" $header) }}
{{- end }}