hide search page from search results

This commit is contained in:
Gabriele Musco 2021-12-25 14:59:08 +01:00
parent 0a0ff640a2
commit af403dd262
No known key found for this signature in database
GPG Key ID: 0587A5D65B5DC99E
2 changed files with 4 additions and 1 deletions

View File

@ -5,4 +5,6 @@ outputs:
- "html"
- "json"
norss: true
nosearch: true
comments: false
---

View File

@ -2,7 +2,8 @@
{
{{ $mscratch := newScratch }}
{{ $mscratch.Add "articles" slice }}
{{ range .Site.RegularPages }}
{{ $pages := where .Site.RegularPages "Params.nosearch" "!=" "true" }}
{{ range $pages }}
{{ $mscratch.Add "articles" (dict
"title" .Title
"date" (.Date.Format "2006-01-02")