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

View file

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

View file

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

View file

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

View file

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