{{ $archive := site.GetPage "/writing" }} {{ $pages := partialCached "writing.html" . }} {{ $topic := eq .Kind "term" }} {{ $tagIndex := eq .Kind "taxonomy" }} {{ if $topic }} {{ $pages = intersect $pages .RegularPages }} {{ else }} {{ with .Params.filterKind }}{{ $pages = where $pages "Params.format" . }}{{ end }} {{ end }}
{{ if $tagIndex }}

Tags

{{ else if $topic }}

Writing tagged #{{ .Data.Term }}

{{ else }}

{{ $archive.Title }}

{{ partial "text.html" $archive.Description }}

{{ end }}
{{ with .OutputFormats.Get "RSS" }} RSS {{ end }}
{{ if $tagIndex }} {{ $tags := slice }} {{ range .Data.Terms.Alphabetical }} {{ if intersect $pages .Pages }}{{ $tags = $tags | append .Page }}{{ end }} {{ end }} {{ if $tags }} {{ else }}

No tags yet.

{{ end }} {{ else if $pages }} {{ else }}

{{ with .Params.filterKind }}No {{ . }}s yet.{{ else }}No writing yet.{{ end }}

{{ end }}