Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/serg/yourfolio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/404.html2
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/head-includes.html9
3 files changed, 8 insertions, 5 deletions
diff --git a/layouts/404.html b/layouts/404.html
index c1c8e08..c9c8caf 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,6 +1,6 @@
{{- define "page-class" -}}error404{{- end -}}
{{- define "head-includes" -}}
- {{- partial "head-includes.html" . -}}
+ {{- partialCached "head-includes.html" . -}}
<style>
.error404 {
height: 100%; }
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index f01d93a..d5982e9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -13,7 +13,7 @@
{{- end -}}
<link rel="shortcut icon" href="{{`favicon.ico` | relURL}}">
{{- block "head-includes" . -}}
- {{- partial "head-includes.html" . -}}
+ {{- partialCached "head-includes.html" . -}}
{{- end -}}
</head>
<body>
diff --git a/layouts/partials/head-includes.html b/layouts/partials/head-includes.html
index 6afa957..9058b6e 100644
--- a/layouts/partials/head-includes.html
+++ b/layouts/partials/head-includes.html
@@ -323,10 +323,13 @@
}
</style>
<noscript id="deferredCss">
- {{$sassOptions := (dict "targetPath" "css/app.css")}}
+ {{$isProduction := hugo.IsProduction | or (eq .Site.Params.env "production")}}
+ {{$sassOptions := dict "targetPath" "css/app.css" "enableSourceMap" (not $isProduction)}}
+
{{$css := resources.Get "scss/app.scss" | toCSS $sassOptions}}
- {{if eq (hugo.Environment) "production" | or (eq .Site.Params.env "production")}}
- {{$css = $css | minify | fingerprint}}
+
+ {{if $isProduction}}
+ {{$css = $css | minify | fingerprint}}
{{end}}
<link rel="stylesheet" href="{{$css.RelPermalink}}">
</noscript>