{{- if eq .Name "section" "content" -}} {{- if .Title}}
{{- inc .Title -}} {{- with .Title -}} {{.}} {{- if $l := lanchor -}} {{- if $s := sanchor}}{{if ne $s $l}}{{end}}{{end -}} {{- else -}} {{- end -}} {{- end -}} {{- range .Children -}} {{- template "content.html" . -}} {{- end -}} {{- dec -}}
{{else -}} {{- range .Children -}} {{- template "content.html" . -}} {{- end -}} {{- end -}} {{- end -}} {{- if eq .Name "list" -}} {{if .Ordered}} {{- range .Children -}} {{- if eq .Name "list" -}} {{- template "content.html" . -}} {{- else -}}
  • {{- template "content.html" . -}}
  • {{- end -}} {{- end -}} {{- if .Ordered}}{{else}}{{end -}} {{- end -}} {{- if eq .Name "table" -}} {{- range .Children -}} {{- template "content.html" . -}} {{- end -}}
    {{- end -}} {{- if eq .Name "header" -}} {{- range .Children -}} {{template "content.html" .}} {{- end -}} {{- end -}} {{- if eq .Name "row" -}} {{- range .Children -}} {{template "content.html" .}} {{- end -}} {{- end -}} {{- if eq .Name "embed" -}}
    {{- if eq .Type "image/png" "image/jpeg" "image/webp" "image/*" -}} {{with .Description}}{{.}}{{else}}embedded {{.Type}}{{end}} {{- end -}} {{- if eq .Type "video/mp4" "video/webm" "video/*" -}} {{- end -}} {{- if not (eq .Type "image/png" "image/jpeg" "image/webp" "image/*" "video/mp4" "video/webm" "video/*") -}}

    Embedded {{.Type}} content: {{.URL}}

    {{- end -}} {{- with .Description}}
    {{.}}
    {{end -}}
    {{- end -}} {{- if eq .Name "text" -}} {{- if eq .Format "" "plain" "pre" "fmt" -}} {{- if eq .Format "" "plain"}}{{range .Contents.Paragraphs}}

    {{.}}

    {{end}}{{end -}} {{- if eq .Format "pre"}}
    {{.Contents.Text}}
    {{end -}} {{- if eq .Format "fmt"}}{{range .Contents.Paragraphs}}{{cnmfmt .}}{{end}}{{end -}} {{- else -}}
    {{.Contents.Text}}
    {{- end -}} {{- end -}} {{- if eq .Name "raw" -}}
    {{.Contents.Text}}
    {{- end -}}