Add custom_scss (#244)
Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
This commit is contained in:
parent
fa59259139
commit
316835734f
|
@ -51,4 +51,5 @@
|
|||
- [John Schroeder](https://blog.schroedernet.software)
|
||||
- [Tobias Lindberg](https://tobiaslindberg.com)
|
||||
- [KK](https://github.com/bebound)
|
||||
- [Eli W. Hunter](https://github.com/elihunter173)
|
||||
- [Víctor López](https://github.com/viticlick)
|
||||
|
|
|
@ -67,6 +67,18 @@
|
|||
<script src="{{ . | relURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Site.Params.custom_scss }}
|
||||
{{/* We don't change the targetPath to because it's transparent to users */}}
|
||||
{{ if $.Site.IsServer }}
|
||||
{{ $cssOpts := (dict "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $styles := resources.Get . | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_32 | default "/images/favicon-32x32.png" | absURL }}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon_16 | default "/images/favicon-16x16.png" | absURL }}" sizes="16x16">
|
||||
|
||||
|
|
Loading…
Reference in New Issue