diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-02 18:13:29 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-02 18:13:29 +0200 |
| commit | 1529a435c59cdc689572f76a1db52ba89918269a (patch) | |
| tree | df7fe2e62b3138468117261dea25947c98f55ce7 | |
| parent | a4e5114151d55f9408ffb4addb52da0c371599c6 (diff) | |
| download | gohugo-theme-ed-1529a435c59cdc689572f76a1db52ba89918269a.tar.gz | |
Rework styles partial
| -rw-r--r-- | exampleSite/config.toml | 2 | ||||
| -rw-r--r-- | layouts/partials/styles.html | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e2f57b1..e868428 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -32,6 +32,8 @@ defaultContentLanguage = "en" apple_touch_icon = "" # 180×180 PNG image for Apple devices webmanifest = "" # Web app manifest with 192×192 and 512×512 PNG icons for modern browsers + disable_fingerprinting = false + [social] # Facebook Page Admin ID for Domain Insights facebook_admin = "" diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html index 5cc2dbd..f50dad5 100644 --- a/layouts/partials/styles.html +++ b/layouts/partials/styles.html @@ -1,3 +1,8 @@ {{- $sass := resources.Get "sass/style.scss" -}} -{{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint -}} +{{- if not site.Params.assets.disable_fingerprinting -}} +{{- $style := $sass | resources.ToCSS | minify | fingerprint -}} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> +{{- else -}} +{{- $style := $sass | resources.ToCSS | minify -}} +<link rel="stylesheet" href="{{ $style.RelPermalink }}"> +{{- end -}} |
