Fix default font size syntax

This commit is contained in:
lucperkins
2020-05-10 11:22:36 -07:00
parent 2e43133b5c
commit 18016776a6

View File

@@ -4,7 +4,7 @@
{{- $cssOpts := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }} {{- $cssOpts := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
{{- $fontName := .Site.Params.font.name | default "Open Sans" }} {{- $fontName := .Site.Params.font.name | default "Open Sans" }}
{{- $fontFace := replace $fontName " " "+" }} {{- $fontFace := replace $fontName " " "+" }}
{{- $fontSizes := delimit .Site.Params.font.sizes "," | default (slice 300 400 600 700) }} {{- $fontSizes := delimit (.Site.Params.font.sizes | default (slice 300 400 600 700)) "," }}
{{- $fontUrl := printf "https://fonts.googleapis.com/css?family=%s:%s" $fontFace $fontSizes }} {{- $fontUrl := printf "https://fonts.googleapis.com/css?family=%s:%s" $fontFace $fontSizes }}
<link rel="icon" type="image/png" href="{{ "images/favicon.png" | relURL }}" /> <link rel="icon" type="image/png" href="{{ "images/favicon.png" | relURL }}" />
<link href="{{ $fontUrl }}" rel="stylesheet"> <link href="{{ $fontUrl }}" rel="stylesheet">