From c7b388346bc69498309d58f7b67422d9d7dc8021 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Jan 2021 12:53:14 +0530 Subject: [PATCH] hide archives and search page from being searched --- layouts/_default/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 436f9e65..2c86f7c4 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,6 +1,6 @@ {{- $.Scratch.Add "index" slice -}} {{- range .Site.RegularPages -}} - {{- if not .Params.searchHidden }} + {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} {{- end }} {{- end -}}