From 07ae9d3230acf97e9b4b17be383cca28cc0301d6 Mon Sep 17 00:00:00 2001 From: gclm Date: Thu, 7 Oct 2021 13:43:34 +0800 Subject: [PATCH 1/2] feat: add 360 and sougou seo support --- exampleSite/config.toml | 3 +++ layouts/partials/head/seo.html | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3af34ca2d..dcf607aca 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -895,6 +895,9 @@ enableEmoji = true yandex = "" pinterest = "" baidu = "" + # 360 搜索 + so = "" + sogou = "" # Site SEO config # 网站 SEO 配置 diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index daf21ece6..d38671aae 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -15,6 +15,12 @@ {{- with .Site.Params.verification.baidu -}} {{- end -}} +{{- with .Site.Params.verification.sogou -}} + +{{- end -}} +{{- with .Site.Params.verification.so -}} + +{{- end -}} {{- /* Home SEO */ -}} {{- if .IsHome -}} From 10e2a05f0bca1653117af3f55fc908d2e858b4fe Mon Sep 17 00:00:00 2001 From: HEIGE-PCloud Date: Thu, 7 Oct 2021 21:01:26 +0100 Subject: [PATCH 2/2] chore: clean up code and update documentation --- exampleSite/config.toml | 1 - .../content/posts/theme-documentation-basics/index.en.md | 2 ++ .../content/posts/theme-documentation-basics/index.zh-cn.md | 2 ++ layouts/partials/head/seo.html | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index dcf607aca..10c4315e6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -895,7 +895,6 @@ enableEmoji = true yandex = "" pinterest = "" baidu = "" - # 360 搜索 so = "" sogou = "" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 0a049c1ba..6673bcb23 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -664,6 +664,8 @@ Please open the code block below to view the complete sample configuration :(far yandex = "" pinterest = "" baidu = "" + so = "" # 360 search + sogou = "" # {{< version 0.2.10 >}} Site SEO config [params.seo] diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 75a80c301..ae45e8664 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -668,6 +668,8 @@ hugo yandex = "" pinterest = "" baidu = "" + so = "" # 360 search + sogou = "" # {{< version 0.2.10 >}} 网站 SEO 配置 [params.seo] diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index d38671aae..49949bd41 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -16,10 +16,10 @@ {{- end -}} {{- with .Site.Params.verification.sogou -}} - + {{- end -}} {{- with .Site.Params.verification.so -}} - + {{- end -}} {{- /* Home SEO */ -}}