{{ hugo.Generator }} {{ with $.Site.Params.site.googleVerification }} {{ end }} {{ with $.Site.Params.site.bingVerifivation }} {{ end }} {{ if $.IsPage }} {{ if isset $.Params "description" }} {{ else if isset $.Site.Params.globalFrontmatter "description" }} {{ end }} {{ if isset $.Params "keywords" }} {{ else if isset $.Site.Params.globalFrontmatter "keywords" }} {{ end }} {{ if isset $.Params "author" }} {{ else if isset $.Site.Params.globalFrontmatter "author" }} {{ end }} {{ else }} {{ with $.Site.Params.globalFrontmatter.description }} {{ end }} {{ with $.Site.Params.globalFrontmatter.author }} {{ end }} {{ end }} {{ if .IsHome }} {{ $.Site.Params.header.title }} {{ else }} {{ $.Page.Title }} | {{ $.Site.Params.header.title }} {{ end }} {{ with $.Site.Params.site.faviconUrl }} {{ end }} {{ $style := slice }} {{/* Record all the css file names, except the general files. */}} {{ $style_files_list := slice }} {{ $style = $style | append ( resources.GetRemote "https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" ) }} {{ $style = $style | append ( resources.Match "_theme/css/*.css" ) }} {{ if isset $.Params "localcss" }} {{ range $css_src := $.Params.localcss }} {{ $style = $style | append ( resources.Match $css_src ) }} {{ $style_files_list = $style_files_list | append $css_src }} {{ end }} {{ end }} {{ if isset $.Params "externalcssdownload" }} {{ range $css_src := $.Params.externalcssdownload }} {{ $style = $style | append ( resources.GetRemote $css_src ) }} {{ $style_files_list = $style_files_list | append $css_src }} {{ end }} {{ end }} {{ with $.Site.Params.globalFrontmatter.localCss }} {{ range $css_src := $.Site.Params.globalFrontmatter.localCss }} {{ $style = $style | append ( resources.Match $css_src ) }} {{ $style_files_list = $style_files_list | append $css_src }} {{ end }} {{ end }} {{ with $.Site.Params.globalFrontmatter.externalCssDownload }} {{ range $css_src := $.Site.Params.globalFrontmatter.externalCssDownload }} {{ $style = $style | append ( resources.GetRemote $css_src ) }} {{ $style_files_list = $style_files_list | append $css_src }} {{ end }} {{ end }} {{ if hugo.IsProduction }} {{/* Create a hash based on the file list, to determince different style file */}} {{ $hash:= substr (jsonify $style_files_list | md5) 0 7 }} {{ $style = $style | resources.Concat ( printf "css/index_%s.css" $hash ) | minify | resources.Fingerprint "sha512" }} {{ else }} {{ range $style }} {{ $currentStyle := . | resources.Fingerprint "sha512" }} {{ end }} {{ end }} {{ $style_seprated := slice }} {{ if isset $.Params "externalcss" }} {{ range $css_src := $.Params.externalcss }} {{ $style_seprated = $style_seprated | append ($css_src ) }} {{ end }} {{ end }} {{ with $.Site.Params.globalFrontmatter.externalCss }} {{ range $css_src := $.Site.Params.globalFrontmatter.externalCss }} {{ $style_seprated = $style_seprated | append ( $css_src ) }} {{ end }} {{ end }} {{ range $style_seprated }} {{ end }} {{ if isset $.Params "usemath" }} {{ if $.Params.usemath }} {{ partial "module/show_math" . }} {{ end }} {{ else if isset $.Site.Params.globalFrontmatter "useMath" }} {{ if $.Site.Params.globalFrontmatter.useMath }} {{ partial "module/show_math" . }} {{ end }} {{ end }}