diff options
-rw-r--r-- | config.json | 7 | ||||
-rw-r--r-- | config.toml | 4 | ||||
-rw-r--r-- | config.yaml | 5 | ||||
-rw-r--r-- | content/canory/messages/gates.md | 21 | ||||
-rw-r--r-- | themes/default/layouts/partials/head-csp.html (renamed from themes/default/layouts/partials/csp.html) | 0 | ||||
-rw-r--r-- | themes/default/layouts/partials/head-manifest.html (renamed from themes/default/layouts/partials/manifest.html) | 0 | ||||
-rw-r--r-- | themes/default/layouts/partials/head-search.html | 11 | ||||
-rw-r--r-- | themes/default/layouts/partials/head.html | 7 |
8 files changed, 53 insertions, 2 deletions
diff --git a/config.json b/config.json index 449f33d..18544c4 100644 --- a/config.json +++ b/config.json @@ -148,6 +148,13 @@ "connectsrc": [ "'self'" ] + }, + "search": { + "verification": { + "google": null, + "bing": null, + "yandex": null + } } }, "outputFormats": { diff --git a/config.toml b/config.toml index a2eb008..fe3d643 100644 --- a/config.toml +++ b/config.toml @@ -107,6 +107,10 @@ enableRobotsTXT = true stylesrc = ["'self'", "'unsafe-inline'", "http://preview.test"] connectsrc = ["'self'"] + [params.search] + + [params.search.verification] + [outputFormats] [outputFormats.html] diff --git a/config.yaml b/config.yaml index 3a52fb2..eeb93dd 100644 --- a/config.yaml +++ b/config.yaml @@ -92,6 +92,11 @@ params: scriptsrcelem: ["'self'", s.imgur.com, platform.twitter.com] stylesrc: ["'self'", "'unsafe-inline'", http://preview.test] connectsrc: ["'self'"] + search: + verification: + google: + bing: + yandex: outputFormats: html: diff --git a/content/canory/messages/gates.md b/content/canory/messages/gates.md new file mode 100644 index 0000000..d264b0b --- /dev/null +++ b/content/canory/messages/gates.md @@ -0,0 +1,21 @@ ++++ +date = "2022-03-01T01:24:31+00:00" +lastmod = "2022-03-01T01:24:31+00:00" +tags = [ "docs", "webmaster" ] +author = "canory" ++++ + +Satisfy the keepers of the gate by officially verifying ownership of your +property, uh, website. Put the verification code from their web mastery tools +into your `hugo` configuration file (`config.yaml`, `config.json`, +`config.toml`). + +```yaml +--- +params: + search: + verification: + google: randomString + bing: randomString + yandex: randomString +``` diff --git a/themes/default/layouts/partials/csp.html b/themes/default/layouts/partials/head-csp.html index d148498..d148498 100644 --- a/themes/default/layouts/partials/csp.html +++ b/themes/default/layouts/partials/head-csp.html diff --git a/themes/default/layouts/partials/manifest.html b/themes/default/layouts/partials/head-manifest.html index 10aa1aa..10aa1aa 100644 --- a/themes/default/layouts/partials/manifest.html +++ b/themes/default/layouts/partials/head-manifest.html diff --git a/themes/default/layouts/partials/head-search.html b/themes/default/layouts/partials/head-search.html new file mode 100644 index 0000000..1bfed6c --- /dev/null +++ b/themes/default/layouts/partials/head-search.html @@ -0,0 +1,11 @@ +{{- with .Site.Params.search.verification.google -}} +<meta name="google-site-verification" content="{{ . }}" /> +{{ end }} + +{{- with .Site.Params.search.verification.bing -}} +<meta name="msvalidate.01" content="{{ . }}" /> +{{ end }} + +{{- with .Site.Params.search.verification.yandex -}} +<meta name="yandex-verification" content="{{ . }}" /> +{{ end }} diff --git a/themes/default/layouts/partials/head.html b/themes/default/layouts/partials/head.html index 37a89e6..a09652a 100644 --- a/themes/default/layouts/partials/head.html +++ b/themes/default/layouts/partials/head.html @@ -29,6 +29,9 @@ <meta name="twitter:description" content="{{- partial "site-description.html" . -}}"> <meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png"> +<!-- Search Verification --> +{{- partial "head-search.html" . -}} + <!-- Style Sheets & Scripts --> {{- $index := resources.Get "js/index.js" -}} {{- $default := resources.Get "css/default.css" -}} @@ -47,10 +50,10 @@ {{ end }} <!-- Progressive Enhancement --> -{{- partial "manifest.html" . -}} +{{- partial "head-manifest.html" . -}} <!-- Content Security Policy --> -{{- partial "csp.html" . -}} +{{- partial "head-csp.html" . -}} <!-- No Scripts --> <noscript> |