{{/* Every page that has pages beneath it, told apart by `params.kind`, which the exporter writes on each one: - `community`, `no_community`: in an export of several communities, a community's overview (or the content in none), drawn as the front page is (`homeLayout` in `hugo.toml`): each section with the containers in it, as a plain list -- or, with "cards", a card per section; - no kind: a section (Wikis, Blogs, ...), listing its containers -- at the top of the site, or beneath a community; - `wiki`: the wiki's page tree, in the wiki's own order (`weight`); - `wiki_page`: a wiki page that has sub-pages -- a page first, so it is drawn exactly like one without; - `blog`, `ideation_blog`: posts, newest first; - `forum`: topics, newest first; - `file_library`: the file list, which is the body the exporter wrote, the files themselves sitting beside it; - `highlights`: the area's pages, in their order. */}} {{ define "main" }} {{- $kind := .Params.kind }} {{- $community := in (slice "community" "no_community") $kind }} {{- if eq $kind "wiki_page" }} {{- partial "article.html" . }} {{- else }} {{- partial "crumbs.html" . }} {{- if and $community (ne site.Params.homeLayout "cards") }} {{- partial "overview.html" . }} {{- else if $community }}
{{- range .Sections.ByWeight }}

{{ .Title }}

{{- end }}
{{- else if not $kind }} {{- partial "containers.html" . }} {{- else if eq $kind "wiki" }} {{- else if in (slice "blog" "ideation_blog" "forum") $kind }} {{- partial "entries.html" .Pages.ByDate.Reverse }} {{- else if eq $kind "file_library" }}
{{- .Content }}
{{- else }} {{- with .Content }}
{{ . }}
{{ end }} {{- partial "entries.html" .Pages.ByWeight }} {{- end }} {{- end }} {{ end }}