diff --git a/themes/buha/layouts/_default/index.json b/themes/buha/layouts/_default/index.json index 4217717..613e986 100644 --- a/themes/buha/layouts/_default/index.json +++ b/themes/buha/layouts/_default/index.json @@ -1,5 +1,5 @@ [ {{- $i := 0 -}} -{{- range where .Site.RegularPages "Section" "ne" "" -}} +{{- range where .Site.RegularPages "Section" "eq" "posts" -}} {{- if not .Params.noSearch -}} {{- if gt $i 0 }},{{ end -}} {"date":"{{ .Date.Unix }}", "url":"{{ .Permalink }}", "title":{{ .Title | jsonify }}, "summary":{{ with .Description}}{{ . | plainify | jsonify }}{{ else }}{{ .Summary | plainify | jsonify }}{{ end }}, "content":{{ .Content | plainify | jsonify }},"tags":[ {{- $t := 0 }}{{- range .Param "tags" -}}{{ if gt $t 0 }},{{ end }}{{ . | jsonify }}{{ $t = add $t 1 }}{{ end -}} ], "section": {{ .Section | jsonify -}} } diff --git a/themes/buha/layouts/shortcodes/search.html b/themes/buha/layouts/shortcodes/search.html index d9134b0..4bce30b 100644 --- a/themes/buha/layouts/shortcodes/search.html +++ b/themes/buha/layouts/shortcodes/search.html @@ -48,7 +48,7 @@ let params = { // Translation of section name (optional) let section_trans = { - "news" : "News", + "posts" : "Posts", // "other-section" : "Other Section" }; diff --git a/themes/buha/layouts/_default/taxonomy.html b/themes/buha/layouts/tags/list.html similarity index 100% rename from themes/buha/layouts/_default/taxonomy.html rename to themes/buha/layouts/tags/list.html diff --git a/themes/buha/layouts/tools/single.html b/themes/buha/layouts/tools/single.html index 86ceff4..76dee69 100644 --- a/themes/buha/layouts/tools/single.html +++ b/themes/buha/layouts/tools/single.html @@ -1,3 +1,11 @@ +{{ define "banner" }} + {{ $image := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $image = .Resources.GetMatch "banner*" }} + {{ end }} + {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }} +{{ end }} + {{ define "content" }} {{ $partial := "" }} {{ if eq .Params.tool "generator" }}