Minify css output

This commit is contained in:
Vri 🌈 2023-01-15 01:03:14 +01:00
parent 2d0fd72dcf
commit a42000fe63
Signed by: vrifox
GPG key ID: D40098E5B60B2197
7 changed files with 17 additions and 12 deletions

View file

@ -1,7 +1,6 @@
{{- define "stylesheet" -}}
{{- $scss := resources.Get "/scss/default.scss" -}}
{{- $style := $scss | resources.ToCSS -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- $style := resources.Get "/scss/default.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "main" }}

View file

@ -1,6 +1,5 @@
{{- define "stylesheet" -}}
{{- $scss := resources.Get "/scss/default.scss" -}}
{{- $style := $scss | resources.ToCSS -}}
{{- $style := resources.Get "/scss/default.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}

View file

@ -1,6 +1,5 @@
{{- define "stylesheet" -}}
{{- $scss := resources.Get "/scss/blog.scss" -}}
{{- $style := $scss | resources.ToCSS -}}
{{- $style := resources.Get "/scss/blog.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}

View file

@ -1,6 +1,5 @@
{{- define "stylesheet" -}}
{{- $scss := resources.Get "/scss/blog.scss" -}}
{{- $style := $scss | resources.ToCSS -}}
{{- $style := resources.Get "/scss/blog.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}

View file

@ -1,3 +1,8 @@
{{- define "stylesheet" -}}
{{- $style := resources.Get "/scss/default.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "main" }}
<main>
<h2>{{ .Params.heading }}</h2>

View file

@ -1,3 +1,8 @@
{{- define "stylesheet" -}}
{{- $style := resources.Get "/scss/default.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "main" }}
<main>
<h2>{{ .Params.heading }}</h2>

View file

@ -1,7 +1,6 @@
{{- define "stylesheet" -}}
{{- $scss := resources.Get "/scss/home.scss" -}}
{{- $style := $scss | resources.ToCSS -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- $style := resources.Get "/scss/home.scss" | resources.ToCSS (dict "outputStyle" "compressed") -}}
<link rel="preload stylesheet" as="style" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{- end -}}
{{- define "header" }}