19 lines
1.0 KiB
HTML
19 lines
1.0 KiB
HTML
{{- $styles := resources.Get "scss/core.scss" -}}
|
|
{{- if hugo.IsProduction -}}
|
|
{{- $tocss_opts := dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true -}}
|
|
{{- $styles = $styles | resources.ToCSS $tocss_opts | resources.Minify | resources.Fingerprint "sha512" -}}
|
|
{{- else -}}
|
|
{{- $tocss_opts := dict "targetPath" "style.css" "enableSourceMap" true -}}
|
|
{{- $styles = $styles | resources.ToCSS $tocss_opts -}}
|
|
{{- end -}}
|
|
<link rel="stylesheet" href="{{- $styles.RelPermalink -}}" integrity="{{- $styles.Data.Integrity -}}">
|
|
|
|
{{/* Prism.js style */}}
|
|
{{ if or (and (findRE "<pre" .Content 1) (eq (.Scratch.Get "params").syntax_highlight.lib "prism.js")) (.HasShortcode "emgithub") }}
|
|
{{ $prism_css := resources.Get "lib/css/prism.css" }}
|
|
{{- if hugo.IsProduction -}}
|
|
{{ $prism_css = $prism_css | resources.Minify | resources.Fingerprint "sha512" -}}
|
|
{{- end -}}
|
|
<link rel="stylesheet" href="{{- $prism_css.RelPermalink -}}" integrity="{{- $prism_css.Data.Integrity -}}">
|
|
{{ end }}
|