Add post: 暗黑能天使
This commit is contained in:
12
layouts/partials/utils/get-style-fonts.html
Normal file
12
layouts/partials/utils/get-style-fonts.html
Normal file
@@ -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 }}
|
||||
Reference in New Issue
Block a user