{{ $title := .Title }} {{ if gt (len $title) 0 }} {{ $title = print $title " | " .Site.Title }} {{ else }} {{ $title = .Site.Title }} {{ end }} {{ $title }} {{ with .Site.Params.author }} {{ end }} {{ template "_internal/twitter_cards.html" . }} {{ template "_internal/opengraph.html" . }} {{ $options := (dict "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" (slice "sass")) }} {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} {{ range .Site.Params.custom_css -}} {{ $custom_template := resources.Get . }} {{ if $custom_template }} {{ $custom_style := $custom_template | resources.ToCSS | resources.Minify }} {{ end }} {{ end }} {{ range .Site.Params.custom_js -}} {{ $custom_template := resources.Get . }} {{ if $custom_template }} {{ $custom_js := $custom_template | resources.Minify | resources.Fingerprint }} {{ end }} {{ end }} {{ $header_img := .Param "header_img" }} {{ if .IsHome }} {{ $header_img = .Site.Params.img_home }} {{ else if eq .Kind "404" }} {{ $header_img = .Site.Params.img_404 }} {{ end }} {{ if $header_img }} {{ .Scratch.Set "header_img" $header_img }} {{ end }} {{ if and .IsPage (gt .WordCount 400 ) (.Params.toc) }} {{ .Scratch.Set "toc" true }} {{ end }} {{ partial "nav.html" . }} {{ partial "search.html" . }} {{ partial "intro-header.html" . }} {{ block "main" . }}
{{ if eq .Site.Params.sidebar.enable false }}
{{ block "container" . }}{{ end }}
{{ else }}
{{ block "container" . }}{{ end }}
{{ end }}
{{ end }} {{ partial "footer.html" . }}