From 7dd8dfe332aa23322a808f7f20ada8ffa1ef91e7 Mon Sep 17 00:00:00 2001 From: razonyang Date: Tue, 31 Oct 2023 22:29:58 +0800 Subject: [PATCH] docs: replace the GoogleAnalytics parameter with services.googleAnalytics.ID --- exampleSite/config/_default/config.toml | 8 +++++--- exampleSite/config/production/config.toml | 5 ++++- exampleSite/content/docs/configuration/site/index.md | 4 +++- .../content/docs/configuration/site/index.zh-hans.md | 4 +++- .../content/docs/configuration/site/index.zh-hant.md | 4 +++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index a0665c276..bb62c4ae7 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -16,9 +16,6 @@ paginate = 10 # Disqus # disqusShortname = "yourdiscussshortname" -# Google analytics -# googleAnalytics = "UA-123-45" - enableRobotsTXT = true enableEmoji = true @@ -31,6 +28,11 @@ pygmentsUseClasses = true timeout = "120s" +[services] + # Google analytics + # [services.googleAnalytics] + # ID = 'G-MEASUREMENT_ID' + [blackfriday] hrefTargetBlank = true diff --git a/exampleSite/config/production/config.toml b/exampleSite/config/production/config.toml index 3a91deb39..76ee28054 100644 --- a/exampleSite/config/production/config.toml +++ b/exampleSite/config/production/config.toml @@ -1,2 +1,5 @@ baseURL = "https://hbs.razonyang.com/v1/" -googleAnalytics = "G-R7DPHPZ86S" + +[services] + [services.googleAnalytics] + ID = 'G-R7DPHPZ86S' diff --git a/exampleSite/content/docs/configuration/site/index.md b/exampleSite/content/docs/configuration/site/index.md index 29c396166..7bd1ee6b3 100644 --- a/exampleSite/content/docs/configuration/site/index.md +++ b/exampleSite/content/docs/configuration/site/index.md @@ -34,7 +34,9 @@ The site configuration is located in `config/_default/config.toml` by default. | `paginatePath` | String | `page` | | `enableRobotsTXT` | Boolean | `true` | | `disqusShortname` | String | - | [Disqus]({{< ref "/docs/widgets/comments#disqus" >}}) shortname. -| `googleAnalytics` | String | - | Google Analytics, both of universal analytics and GA4 are supported. +| `services` | Object | - | +| `services.googleAnalytics` | Object | - | Google Analytics, supports GA4 only. +| `services.googleAnalytics.ID` | String | - | Measurement ID. | `author` | Object | - | [Author Widget]({{< ref "/docs/widgets/author" >}}). See also [All Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings). diff --git a/exampleSite/content/docs/configuration/site/index.zh-hans.md b/exampleSite/content/docs/configuration/site/index.zh-hans.md index 149c2ea1b..cd0bad846 100644 --- a/exampleSite/content/docs/configuration/site/index.zh-hans.md +++ b/exampleSite/content/docs/configuration/site/index.zh-hans.md @@ -34,7 +34,9 @@ authors = ["RazonYang"] | `paginatePath` | String | `page` | | `enableRobotsTXT` | Boolean | `true` | | `disqusShortname` | String | - | [Disqus]({{< ref "/docs/widgets/comments#disqus" >}}) shortname。 -| `googleAnalytics` | String | - | Google Analytics, both of universal analytics and GA4 are supported. +| `services` | Object | - | +| `services.googleAnalytics` | Object | - | Google Analytics, supports GA4 only. +| `services.googleAnalytics.ID` | String | - | Measurement ID. | `author` | Object | - | [作者小部件]({{< ref "/docs/widgets/author" >}})。 请参阅 [All Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings)。 diff --git a/exampleSite/content/docs/configuration/site/index.zh-hant.md b/exampleSite/content/docs/configuration/site/index.zh-hant.md index b036b68d4..71cfc3828 100644 --- a/exampleSite/content/docs/configuration/site/index.zh-hant.md +++ b/exampleSite/content/docs/configuration/site/index.zh-hant.md @@ -34,7 +34,9 @@ authors = ["RazonYang"] | `paginatePath` | String | `page` | | `enableRobotsTXT` | Boolean | `true` | | `disqusShortname` | String | - | [Disqus]({{< ref "/docs/widgets/comments#disqus" >}}) shortname。 -| `googleAnalytics` | String | - | Google Analytics, both of universal analytics and GA4 are supported. +| `services` | Object | - | +| `services.googleAnalytics` | Object | - | Google Analytics, supports GA4 only. +| `services.googleAnalytics.ID` | String | - | Measurement ID. | `author` | Object | - | [作者小部件]({{< ref "/docs/widgets/author" >}})。 請參閱 [All Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings)。