Remove included pages from local search and search engines (#542)

This commit is contained in:
Pete Lumbis 2023-09-01 16:36:32 +02:00 committed by GitHub
parent 1ddcf18157
commit 480b7e9232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
--- ---
tocHidden: true tocHidden: true
searchExclude: true
--- ---
## Install Crossplane ## Install Crossplane

View File

@ -1,5 +1,6 @@
--- ---
tocHidden: true tocHidden: true
searchExclude: true
--- ---
## Install Crossplane ## Install Crossplane

View File

@ -1,7 +1,7 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"> xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range where .Site.Pages "Section" "latest" }} {{ range where (where .Site.Pages "Section" "latest") ".Params.searchExclude" "ne" "true" }}
<url> <url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }} <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}