{{- $scratch := newScratch -}} {{- .Scratch.Set "scratch" $scratch -}} {{- if eq hugo.Environment "production" -}} {{- $scratch.Set "CDN" .Site.Params.cdn -}} {{- $scratch.Set "fingerprint" .Site.Params.fingerprint -}} {{- end -}} {{- $scratch.Set "major-version" "0.2.X" -}} {{- $scratch.Set "version" "0.2.0" -}} {{- /* LoveIt theme version detection */ -}} {{- if not .Site.Params.version -}} {{- errorf "\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration \n你还没有正确配置 LoveIt 的版本参数 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration \n" -}} {{- else if ne .Site.Params.version ($scratch.Get "major-version") -}} {{- errorf (printf "\n\n%s -> %s:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases \n你进行了一次不兼容的更新 参考 https://github.com/dillonzq/LoveIt/releases \n" .Site.Params.version ($scratch.Get "major-version")) -}} {{- end -}} {{- block "title" . }}{{ .Site.Title }}{{ end -}} {{- partial "head/meta.html" . -}} {{- partial "head/link.html" . -}} {{- partial "head/seo.html" . -}} {{- /* Check theme isDark before body rendering */ -}} {{- /* Body wrapper */ -}}
{{- partial "header.html" . -}}
{{- block "content" . }}{{ end -}}
{{- partial "footer.html" . -}}
{{- /* top button */ -}}
{{- /* Load JavaScript scripts and CSS */ -}} {{- partial "assets.html" . -}}