diff options
-rw-r--r-- | layouts/partials/custom-css.html | 4 | ||||
-rw-r--r-- | layouts/partials/meta/google-analytics-async.html | 4 | ||||
-rw-r--r-- | layouts/partials/meta/google-site-verification.html | 4 | ||||
-rw-r--r-- | layouts/partials/meta/tag-manager.html | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/layouts/partials/custom-css.html b/layouts/partials/custom-css.html index 1917867..849cc3d 100644 --- a/layouts/partials/custom-css.html +++ b/layouts/partials/custom-css.html @@ -1,6 +1,6 @@ <style> :root { - {{ with .Site.Params.custom_font_color }}--custom-font-color: {{ . }};{{ end }} - {{ with .Site.Params.custom_background_color }}--custom-background-color: {{ . }};{{ end }} + {{- with .Site.Params.custom_font_color }}--custom-font-color: {{ . }};{{ end -}} + {{- with .Site.Params.custom_background_color }}--custom-background-color: {{ . }};{{ end -}} } </style> diff --git a/layouts/partials/meta/google-analytics-async.html b/layouts/partials/meta/google-analytics-async.html index 144d54e..79d93af 100644 --- a/layouts/partials/meta/google-analytics-async.html +++ b/layouts/partials/meta/google-analytics-async.html @@ -1,6 +1,6 @@ -{{ if .Site.IsServer }} +{{- if .Site.IsServer -}} <!-- only production, not generate Google Analytics with Hugo’s built-in server --> -{{ else }} +{{- else -}} {{- with .Site.Params.google_analytics_id -}} <!-- BEGIN: Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script> diff --git a/layouts/partials/meta/google-site-verification.html b/layouts/partials/meta/google-site-verification.html index 68bfaf9..5f5d0e5 100644 --- a/layouts/partials/meta/google-site-verification.html +++ b/layouts/partials/meta/google-site-verification.html @@ -1,6 +1,6 @@ -{{ if .Site.IsServer }} +{{- if .Site.IsServer -}} <!-- only production, not generate google-site-verification with Hugo’s built-in server --> -{{ else }} +{{- else -}} {{- if .IsHome -}} {{- with .Site.Params.google_site_verification -}} <meta name="google-site-verification" content="{{ . }}"> diff --git a/layouts/partials/meta/tag-manager.html b/layouts/partials/meta/tag-manager.html index 82a27fb..d527032 100644 --- a/layouts/partials/meta/tag-manager.html +++ b/layouts/partials/meta/tag-manager.html @@ -1,6 +1,6 @@ -{{ if .Site.IsServer }} +{{- if .Site.IsServer -}} <!-- only production, not generate Tag Manager with Hugo’s built-in server --> -{{ else }} +{{- else -}} {{- with .Site.Params.tag_manager_container_id -}} <!-- BEGIN: Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |