{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }} {{ $data := index $.Site.Data $config }} {{ range $data.links }} {{ if strings.Contains .link "twitter.com" }} {{ $twitter_handle := index (split .link "/") (sub (len (split .link "/")) 1) }} {{ end }} {{ end }} {{ if .Title }}{{ .Title }}{{ else }}{{ $data.page_title | default $.Site.Data.config.page_title }}{{ end }} {{ $favicon := $data.favicon | default $.Site.Data.config.favicon | default (slice (dict "rel" "shortcut icon" "type" "image/png" "href" "icon.png")) }} {{ $type := (printf "%T" $favicon) }} {{ if eq $type "string" }} {{ $favicon | safeHTML }} {{ else }} {{ range $favicon }} {{- end }} {{ end }} {{$sass := resources.Match "styles/[!_]*.scss" }} {{$css := slice }} {{range $sass}} {{$scss := . | resources.ToCSS (dict "outputStyle" "compressed") }} {{$css = $css | append $scss}} {{end}} {{if $data.enableCallouts | default $.Site.Data.config.enableCallouts}} {{$scss := resources.Get "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 "styles/_light_syntax.scss" | resources.ToCSS (dict "outputStyle" "compressed") | resources.Fingerprint "md5" | resources.Minify }} {{$scripts := (slice "js/darkmode.js" "js/util.js")}} {{range $scripts}} {{$scriptname := .}} {{ $s := resources.Get $scriptname | resources.ExecuteAsTemplate $scriptname . | resources.Fingerprint "md5" | resources.Minify }} {{end}} {{partial "katex.html" .}} {{partial "mermaid.html" .}} {{ $popover := resources.Get "js/popover.js" | resources.Fingerprint "md5" | resources.Minify }} {{ if $data.enableCodeBlockTitle | default $.Site.Data.config.enableCallouts }} {{ $codeTitle := resources.Get "js/code-title.js" | resources.Fingerprint "md5" | resources.Minify }} {{end}} {{ if $data.enableCodeBlockCopy | default $.Site.Data.config.enableCodeBlockCopy }} {{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }} {{ end }} {{ if $data.enableCallouts | default $.Site.Data.config.enableCallouts }} {{ $callouts := resources.Get "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.Data.config.enableSPA}} {{ $router := resources.Get "js/router.js" | resources.Fingerprint "md5" | resources.Minify }} {{else}} {{end}} {{ $trimmedURL := trim (index (split .Site.BaseURL "://") 1) "/" }}