{{ define "main" }}
{{- partial "meta.html" . -}}
{{ .Content }}
{{- $pctx := . -}} {{- $pages := $pctx.RegularPages -}} {{- if .IsHome -}} {{ $pages = .Site.RegularPages }} {{ "**精选:**" | markdownify }} {{- end -}} {{ range $pages }}
{{ if (eq $pctx.Kind "taxonomy") }} {{ .Scratch.Set "taxonomy" (add $pctx.Type $pctx.Title) }} {{ end }} {{- partial "taxonomy.html" . -}}

{{ .Title }}

{{ if .Description }} {{ .Description | markdownify }} {{ else }} {{ if .Truncated }} {{ .Summary | truncate 150 | markdownify }}... {{ end }} {{ end }}
{{ end }} {{- if .IsHome -}} {{ range $tagName, $taxonomy := .Site.Taxonomies.categories }} {{ with $.Site.GetPage (printf "%s/%s" "categories" $tagName) }} {{ $tagName }}({{ len $taxonomy }}) {{ end }} {{ end }} {{ .Page.Site.Params.HomeDesc | markdownify }} {{ end }}
{{ end }}