Welcome to mirror list, hosted at ThFree Co, Russian Federation.

get-style-fonts.html « utils « partials « layouts - github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f47916e2d91e3dec08105905556d9ffdd4f09bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{ $style := (index .context.Site.Data.styles (.context.Site.Params.style | default "default")) }}
{{ $result := slice }}
{{ range $style.fonts }}
  {{ $item := index . $.param }}
  {{ if $item }}
    {{ $result = $result | append $item }}
  {{ end }}
{{ else }}
  {{/* TODO: use realtime location */}}
  {{ errorf "Could not find fonts section in style %s." .context.Site.Params.style }}
{{ end }}
{{ return $result }}