keep the parameters consistent

pull/584/head
Dejavu Moe 2023-06-26 14:24:39 +08:00
parent 35ead410c7
commit 467ebf9e05
No known key found for this signature in database
GPG Key ID: 8422222222222222
4 changed files with 8 additions and 8 deletions

View File

@ -70,7 +70,7 @@ fingerprintAlgorithm = "sha256"
# site = "ABC12345" # site = "ABC12345"
# domain = "llama.yoursite.com" # domain = "llama.yoursite.com"
[plausible] [plausibleAnalytics]
# domain = "blog.yoursite.com" # domain = "blog.yoursite.com"
# event = "" # event = ""
# script = "" # script = ""

View File

@ -170,9 +170,9 @@ 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.| |`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.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.| |`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|`plausible.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`plausibleAnalytics.domain`|_Not set_|Enter the domain 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 proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`plausibleAnalytics.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`plausible.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.| |`plausibleAnalytics.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`verification.google`|_Not set_|The site verification string provided by Google to be included in the site metadata.| |`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.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.| |`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.|

View File

@ -31,7 +31,7 @@ To enable Plausible analytics support, simply provide the domain of the website
```toml ```toml
# config/_default/params.toml # config/_default/params.toml
[plausible] [plausibleAnalytics]
domain = "blog.yoursite.com" domain = "blog.yoursite.com"
event = "https://plausible.yoursite.com/api/event" event = "https://plausible.yoursite.com/api/event"
script = "https://plausible.yoursite.com/js/script.js" script = "https://plausible.yoursite.com/js/script.js"

View File

@ -6,11 +6,11 @@
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script> <script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ with site.Params.plausible.domain }} {{ with site.Params.plausibleAnalytics.domain }}
<script defer <script defer
data-domain="{{ . }}" data-domain="{{ . }}"
data-api="{{ default "https://plausible.io/api/event" site.Params.plausible.event }}" data-api="{{ default "https://plausible.io/api/event" site.Params.plausibleAnalytics.event }}"
src="{{ default "https://plausible.io/js/script.js" site.Params.plausible.script }}"></script> src="{{ default "https://plausible.io/js/script.js" site.Params.plausibleAnalytics.script }}"></script>
{{ end }} {{ end }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }} {{ end }}