support hugo templates in scss

This commit is contained in:
a 2022-10-17 10:02:26 -05:00
parent 764fdc71a0
commit b49da022f8
2 changed files with 3 additions and 4 deletions

View file

@ -43,4 +43,3 @@ a[href^="http://localhost"]:after
{ {
display: none !important; display: none !important;
} }

View file

@ -5,12 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
{{ $screen := resources.Get "styles/screen.scss" | toCSS | minify | fingerprint }} {{ $screen := resources.Get "styles/screen.scss" | resources.ExecuteAsTemplate "style.screen.scss" . | toCSS | minify | fingerprint }}
<link rel="stylesheet" <link rel="stylesheet"
href="{{ $screen.Permalink }}" href="{{ $screen.Permalink }}"
integrity="{{ $screen.Data.Integrity }}" integrity="{{ $screen.Data.Integrity }}"
media="screen" /> media="screen" />
{{ $print := resources.Get "styles/print.scss" | toCSS | minify | fingerprint }} {{ $print := resources.Get "styles/print.scss" | resources.ExecuteAsTemplate "style.print.scss" . | toCSS | minify | fingerprint }}
<link rel="stylesheet" <link rel="stylesheet"
href="{{ $print.Permalink }}" href="{{ $print.Permalink }}"
integrity="{{ $print.Data.Integrity }}" integrity="{{ $print.Data.Integrity }}"