{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }} {{ $data := $.Site.Params }} {{ if .Title }}{{ .Title }}{{ else }}{{ $.Site.Params.title | default $.Site.Params.title }}{{ end }} {{ $favicon := $data.favicon | default $.Site.Params.favicon | default (slice (dict "rel" "shortcut icon" "type" "image/png" "href" "favicon.png")) }} {{ $type := (printf "%T" $favicon) }} {{ if eq $type "string" }} {{ $favicon | safeHTML }} {{ else }} {{ range $favicon }} {{- end }} {{ end }} {{$sass := resources.Match "quartz/styles/[!_]*.scss" }} {{$css := slice }} {{range $sass}} {{$scss := . | resources.ToCSS (dict "outputStyle" "compressed") }} {{$css = $css | append $scss}} {{end}} {{if $data.enableCallouts | default $.Site.Params.enableCallouts}} {{$scss := resources.Get "quartz/styles/_callouts.scss" | resources.ToCSS (dict "outputStyle" "compressed") }} {{$css = $css | append $scss}} {{end}} {{$finalCss := $css | resources.Concat "styles.css" | resources.Fingerprint "md5" | resources.Minify }} {{$lightSyntax := resources.Get "quartz/styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }} {{partial "quartz/katex" .}} {{partial "quartz/mermaid" .}} {{$scripts := (slice "quartz/js/darkmode.js" "quartz/js/util.js")}} {{range $scripts}} {{$scriptname := .}} {{ $s := resources.Get $scriptname | resources.ExecuteAsTemplate $scriptname . | resources.Fingerprint "md5" | resources.Minify }} {{end}} {{ $popover := resources.Get "quartz/js/popover.js" | resources.Fingerprint "md5" | resources.Minify }} {{ if $data.enableCodeBlockTitle | default $.Site.Params.enableCallouts }} {{ $codeTitle := resources.Get "quartz/js/code-title.js" | resources.Fingerprint "md5" | resources.Minify }} {{end}} {{ if $data.enableCodeBlockCopy | default $.Site.Params.enableCodeBlockCopy }} {{ $clipboard := resources.Get "quartz/js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }} {{ end }} {{ if $data.enableCallouts | default $.Site.Params.enableCallouts }} {{ $callouts := resources.Get "quartz/js/callouts.js" | resources.Fingerprint "md5" | resources.Minify }} {{ end }} {{$linkIndex := resources.Get "indices/linkIndex.json" | resources.Fingerprint "md5" | resources.Minify | }} {{$contentIndex := resources.Get "indices/contentIndex.json" | resources.Fingerprint "md5" | resources.Minify }} {{if $data.enableSPA | default $.Site.Params.enableSPA}} {{ $router := resources.Get "quartz/js/router.js" | resources.Fingerprint "md5" | resources.Minify }} {{else}} {{end}}