add hint for 404 files to code snippet

This commit is contained in:
Kim Oliver Drechsel 2022-01-16 15:14:26 +01:00
parent 9602c080cb
commit 11727c0659
Signed by: Kim
GPG Key ID: B9D907EF02605A07
2 changed files with 8 additions and 2 deletions

View File

@ -7,7 +7,10 @@ Add automatically generated Search Engine Optimization to your Website
1. Add this code to your `<head></head>` structure (e.g in `layouts/_default/baseof.html`):
```html
<!-- Site Indexing toggled by key value of `private` in Page/Post Settings -->
<!--
Site Indexing toggled by key value of `private` in Page/Post Settings
404.html and 404.php are noindex, nofollow by default
-->
<meta name="robots" content=
{{- if or (.Params.private) (in (string .Permalink) "404.html") (in (string .Permalink) "404.php") -}}
"noindex, nofollow"

View File

@ -1,4 +1,7 @@
<!-- Site Indexing toggled by key value of `private` in Page/Post Settings -->
<!--
Site Indexing toggled by key value of `private` in Page/Post Settings
404.html and 404.php are noindex, nofollow by default
-->
<meta name="robots" content=
{{- if or (.Params.private) (in (string .Permalink) "404.html") (in (string .Permalink) "404.php") -}}
"noindex, nofollow"