diff options
Diffstat (limited to 'layouts/partials/utils/get-style-fonts.html')
-rw-r--r-- | layouts/partials/utils/get-style-fonts.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/layouts/partials/utils/get-style-fonts.html b/layouts/partials/utils/get-style-fonts.html new file mode 100644 index 0000000..f47916e --- /dev/null +++ b/layouts/partials/utils/get-style-fonts.html @@ -0,0 +1,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 }} |