move the syntax highlighting theme choice to the scss file ()

* move the syntax highlighting theme choice to the scss file
Fixes 

* move the syntax highlighting theme choice to the scss file
Fixes 
This commit is contained in:
slashformotion 2021-08-21 15:31:28 +02:00 committed by GitHub
commit 4432cb953b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 16 deletions
layouts/partials

View file

@ -17,21 +17,8 @@
<script defer src="{{ "/js/main.js" | relURL }}"></script>
<!-- Main CSS file based on Pure blog layout -->
{{ if and (isset .Site.Params "codeblocksdark") .Site.Params.codeBlocksDark }}
{{ $codeoptions := (dict "targetPath" "/css/highlight-dark.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
<link rel="stylesheet" href="{{ $style.Permalink | relURL }}">
{{ else }}
{{ $codeoptions := (dict "targetPath" "/css/highlight-light.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $codestyle := resources.Get "scss/highlight-light.scss" | resources.ToCSS $codeoptions }}
<link rel="stylesheet" href="{{ $codestyle.Permalink | relURL }}">
{{ end }}
{{ $htoptions := (dict "targetPath" "/css/hugo-tufte.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $htstyle := resources.Get "scss/hugo-tufte.scss" | resources.ToCSS $htoptions }}
{{ $htstyle := resources.Get "scss/hugo-tufte.scss"| resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $htoptions }}
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">
<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">