From bff55c09b194aa98a4b0bb0ded3839ac435afe75 Mon Sep 17 00:00:00 2001 From: Dejavu Moe Date: Fri, 16 Jun 2023 11:42:32 +0800 Subject: [PATCH] docs: add plausible analytics --- exampleSite/content/docs/configuration/index.md | 4 ++++ exampleSite/content/docs/partials/index.md | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index e898deae..8468a307 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -170,6 +170,10 @@ Many of the article defaults here can be overridden on a per article basis by sp |`taxonomy.showTermCount`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.| |`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.| +|`plausible.enable`|`false`|Whether to enable Plausible analysis, set `true` to enable.| +|`plausible.domain`|_Not set_|Enter the domain name of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| +|`plausible.event`|_Not set_|Plausible api event proxy URL. Refer to [Using a proxy for analytics](https://plausible.io/docs/proxy/introduction) for more details.| +|`plausible.script`|_Not set_|Plausible analysis script proxy URL. Refer to [Using a proxy for analytics](https://plausible.io/docs/proxy/introduction) for more details.| |`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.| |`verification.bing`|_Not set_|The site verification string provided by Bing to be included in the site metadata.| |`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.| diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index abb44d5a..ec282785 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -24,6 +24,19 @@ To enable Fathom Analytics support, simply provide your Fathom site code in the domain = "llama.yoursite.com" ``` +### Plausible Analytics + +To enable Plausible analytics support, simply set `plausible.enable` to `true` in the `config/_default/params.toml` file, and then provide your Plausible site `domain`. If you are using a self-hosted Plausible, or wish to use [proxied analytics](https://plausible.io/docs/proxy/introduction) scripts and event API router, you can also provide additional `event` and `script` configuration values. If you do not provide these two values, the script will load directly with Plausible's default. + +```toml +# config/_default/params.toml + +[plausible] + enable = true + domain = "blog.yoursite.com" + event = "https://stats.dejavu.moe/blog" + script = "https://stats.dejavu.moe/react.min.js" + ### Google Analytics Google Analytics support is provided through the internal Hugo partial. Simply provide the `googleAnalytics` key in the `config/_default/config.toml` file and the script will be added automatically.