From f3287bef7739b15568b1c6f100ac8e74410a5e4e Mon Sep 17 00:00:00 2001 From: Will Faught Date: Wed, 14 Dec 2022 18:00:02 -0800 Subject: [PATCH] Change home page title default to site title in search JSON --- layouts/_default/home.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/_default/home.json b/layouts/_default/home.json index ef30e56e..a43fddf9 100644 --- a/layouts/_default/home.json +++ b/layouts/_default/home.json @@ -1,7 +1,11 @@ {{- $.Scratch.Add "index" slice -}} {{- range where .Site.Pages "Params.excludesearch" "ne" true -}} +{{- $title := .Title | markdownify | plainify | htmlUnescape -}} +{{- if and (not $title) .IsHome }} +{{- $title = site.Title }} +{{- end -}} {{- $.Scratch.Add "index" (dict - "title" (.Title | markdownify | plainify | htmlUnescape) + "title" $title "description" (.Description | markdownify | plainify | htmlUnescape) "date" .PublishDate "categories" .Params.categories