{{- $page := .page }} {{- $location := .location }} {{- $assetBusting := partialCached "assetbusting.gotmpl" site.Home }} {{- $minify := not hugo.IsServer }} {{- if and (isset site.Params "minify") (ne site.Params.minify "") }} {{- $minify = site.Params.minify }} {{- end }} {{- if eq $location "default" }} {{- with $page }} {{- .Store.Set "needsTheme" true }} {{- end }} {{- else if eq $location "header" }} {{- with $page }} {{- $outputFormat := "html" }} {{- with .Store.Get "relearnOutputFormat" }} {{- $outputFormat = . }} {{- else }} {{- warnf "WARNING no key `relearnOutputFormat` found in page store; define a block `storeOutputFormat` for your HTML based output format templates and add `{{- .Store.Set \"relearnOutputFormat\" \"\" }}`; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/8/#8-0-0" }} {{- end }} {{- $min := cond $minify ".min" "" }} {{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" site.Home }} {{- $quotedthemevariants := slice }} {{- range $themevariants }} {{- if not .hidden }} {{- $quotedthemevariants = $quotedthemevariants | append (printf "'%s'" .identifier) }} {{- end }} {{- end }} {{- $wrap := true }} {{- if isset site.Params "highlightwrap" }} {{- $wrap = site.Params.highlightWrap }} {{- end }} {{- if isset .Params "highlightwrap" }} {{- $wrap = .Params.highlightWrap }} {{- end }} {{- $disableInlineCopyToClipboard := site.Params.disableInlineCopyToClipBoard }} {{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}} {{- with resources.Get "/fonts/fontawesome/css/all.min.css" }} {{- end }} {{- with resources.Get "/css/perfect-scrollbar/perfect-scrollbar.min.css" }} {{- end }} {{- $versionIndexUrl := "" }} {{- $versions := partialCached "_relearn/siteVersions.gotmpl" site.Home }} {{- if $versions }} {{- $versionIndexUrl = trim (or site.Params.versionIndexURL "versionindex.js") "/" }} {{- $versionIndexUrl = path.Join (path.Dir $versionIndexUrl) (print (path.BaseName $versionIndexUrl) "." site.Language.Lang (path.Ext $versionIndexUrl)) }} {{- if .IsHome }} {{- $templateres := resources.Get "/_relearn_versionindex.js" }} {{- $resultres := $templateres | resources.ExecuteAsTemplate $versionIndexUrl site.Home }} {{- /* the following code causes Hugo to generate our file in public */}} {{- $url := $resultres.RelPermalink }} {{- end }} {{- with (where $versions "isLatest" true | first 1) }} {{- range . }} {{- $versionIndexUrl = print .baseURL "/" $versionIndexUrl }} {{- end }} {{- end }} {{- end }} {{- $path := partial "_relearn/pageLangPath.gotmpl" . }} {{- end }} {{- else if eq $location "footer" }} {{- with $page }} {{- with resources.Get "/js/perfect-scrollbar/perfect-scrollbar.min.js" }} {{- end }} {{- with resources.Get "/js/theme.js" }} {{- $res := . }} {{- if $minify }} {{- $res = $res | minify }} {{- end }} {{- end }} {{- end }} {{- end }}