{{ .Scratch.SetInMap "params" "syntax_highlight" (.Site.Params.syntax_highlight | default (dict "lib" "builtin" "builtin" (dict "enable_code_copy" true))) }}
{{ .Scratch.SetInMap "params" "enable_site_search" (.Site.Params.enable_site_search | default false) }}
{{ .Scratch.SetInMap "params" "search_hidden" (.Params.search_hidden | default false) }}
{{ .Scratch.SetInMap "params" "navbar_title" (.Params.navbar_title | default .Site.Params.navbar_title | default .Site.Title) }}
{{ .Scratch.SetInMap "params" "author" (.Params.author | default .Site.Params.author) }}
{{ .Scratch.SetInMap "params" "enable_open_graph" (.Params.open_graph | default .Site.Params.enable_open_graph | default true) }}
{{ .Scratch.SetInMap "params" "enable_twitter_cards" (.Params.twitter_cards | default .Site.Params.enable_twitter_cards | default true) }}
{{ .Scratch.SetInMap "params" "enable_toc" (.Params.toc | default .Site.Params.enable_toc | default true) }}
{{ .Scratch.SetInMap "params" "enable_zooming_js" (.Params.zooming_js | default .Site.Params.enable_zooming_js | default true) }}
{{ .Scratch.SetInMap "params" "ga_code" (.Params.ga | default .Site.GoogleAnalytics) }}
{{ .Scratch.SetInMap "params" "footer" (.Params.footer | default .Site.Params.footer) }}
{{ .Scratch.SetInMap "params" "math" (.Params.math | default .Site.Params.enable_math | default false) }}
{{ .Scratch.SetInMap "params" "enable_collapsible_toc" (.Params.collapsible_toc | default .Site.Params.enable_collapsible_toc | default false) }}
{{ .Scratch.SetInMap "params" "enable_collapsible_changelogs" (.Params.collapsible_changelogs | default .Site.Params.enable_collapsible_changelogs | default false) }}
{{ .Scratch.SetInMap "params" "color_scheme" (.Site.Params.color_scheme | default "light") }}

<!DOCTYPE html>
<html lang='{{ .Site.LanguageCode }}'>
    {{- partial "head.html" . -}}
    <body>
        <main>
            {{- partial "header.html" . -}}
            {{- partial "nav.html" . -}}
            {{- partial "sidebar.html" . -}}
            <div id="content" class="content-margin">
                {{ if .Params.changelogs }}
                    {{ $enable_collapsible_changelogs := (.Scratch.Get "params").enable_collapsible_changelogs }}
                    {{ partial "collapsible-menu.html" (dict "type" "changelogs" "context" . "enable" $enable_collapsible_changelogs) }}
                {{ end }}

                {{- block "content" . }}{{- end }}

                {{ if eq .Kind "page" }}
                    {{ if (.Params.disqus | default .Site.DisqusShortname) }}
                        {{- partial "disqus.html" . -}}
                    {{ end }}
                {{ else }}
                    {{ if (.Params.disqus | default false) }}
                        {{- partial "disqus.html" . -}}
                    {{ end }}
                {{ end }}
            </div>
            {{- partial "footer.html" . -}}
        </main>
    </body>
</html>
