{{ $section := .Section }} {{ if eq $section "diary" }}
Фильтры
  • Все записи
{{ .Scratch.Set "tags" (index .Site.Taxonomies.tags (slice "diary")) }} {{ $diaryTags := slice }} {{ range where .Site.RegularPages "Section" "diary" }} {{ range .Params.tags }} {{ $diaryTags = $diaryTags | append . }} {{ end }} {{ end }} {{ $diaryTags = $diaryTags | uniq }} {{ if $diaryTags }}
Теги
    {{ range $diaryTags }}
  • {{ . }}
  • {{ end }}
{{ end }} {{ else if eq $section "kb" }}
Фильтры
  • Все статьи
{{ $kbTags := slice }} {{ range where .Site.RegularPages "Section" "kb" }} {{ range .Params.tags }} {{ $kbTags = $kbTags | append . }} {{ end }} {{ end }} {{ $kbTags = $kbTags | uniq }} {{ if $kbTags }}
Теги
    {{ range $kbTags }}
  • {{ . }}
  • {{ end }}
{{ end }} {{ else if eq $section "plans" }}
Статусы
  • Все планы
  • 🟡 Запланировано
  • 🟠 В процессе
  • ✅ Сделано
  • ❌ Отменено
{{ else if eq $section "guides" }}
Фильтры
  • Все инструкции
{{ $guideTags := slice }} {{ range where .Site.RegularPages "Section" "guides" }} {{ range .Params.tags }} {{ $guideTags = $guideTags | append . }} {{ end }} {{ end }} {{ $guideTags = $guideTags | uniq }} {{ if $guideTags }}
Теги
    {{ range $guideTags }}
  • {{ . }}
  • {{ end }}
{{ end }} {{ else if eq $section "creds" }}
Фильтры
  • Все креды
{{ $credServices := slice }} {{ range where .Site.RegularPages "Section" "creds" }} {{ if .Params.service }} {{ $credServices = $credServices | append .Params.service }} {{ end }} {{ end }} {{ $credServices = $credServices | uniq }} {{ if $credServices }}
Сервисы
    {{ range $credServices }}
  • {{ . }}
  • {{ end }}
{{ end }} {{ else }}
Разделы
    {{ range .Site.Menus.main }}
  • {{ .Name }}
  • {{ end }}
{{ end }}