Skip to content

Commit

Permalink
Docs: 增加更多统计插件配置文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Nov 22, 2024
1 parent c825528 commit b45e8f4
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 1 deletion.
25 changes: 25 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,31 @@ disableThemeInject = false
# server url for your tracker if you're self hosting
# 自行托管追踪器时的主机路径
server = ""
# FixIt 0.3.16 | NEW Baidu Analytics
[analytics.baidu]
id = ""
# FixIt 0.3.16 | NEW Umami Analytics
[analytics.umami]
data_website_id = ""
src = ""
data_host_url = ""
data_domains = ""
# FixIt 0.3.16 | NEW Plausible Analytics
[analytics.plausible]
data_domain = ""
src = ""
# FixIt 0.3.16 | NEW Cloudflare Analytics
[analytics.cloudflare]
token = ""
# FixIt 0.3.16 | NEW Splitbee Analytics
[analytics.splitbee]
enable = false
# no cookie mode
no_cookie = true
# respect the do not track setting of the browser
do_not_track = true
# token(optional), more info on https://splitbee.io/docs/embed-the-script
data_token = ""

# Cookie consent config
# Cookie 许可配置
Expand Down
54 changes: 54 additions & 0 deletions content/en/documentation/getting-started/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,23 @@ thumbnailUrl
[params.analytics.fathom]
id = ""
server = ""
[params.analytics.baidu]
id = ""
[params.analytics.umami]
data_website_id = ""
src = ""
data_host_url = ""
data_domains = ""
[params.analytics.plausible]
data_domain = ""
src = ""
[params.analytics.cloudflare]
token = ""
[params.analytics.splitbee]
enable = false
no_cookie = true
do_not_track = true
data_token = ""
```

enable
Expand All @@ -1151,6 +1168,43 @@ fathom
- id: `string` Fathom Analytics ID.
- server: `string` Server URL for your tracker if you're self hosting.

baidu
: {{< version 0.3.16 >}}\
`map` Baidu Analytics Configuration.

- id: `string` Baidu Analytics ID.

umami
: {{< version 0.3.16 >}}\
`map` Umami Analytics Configuration.

- data_website_id: `string` Umami Analytics website ID.
- src: `string` The script URL of Umami Analytics.
- data_host_url: `string` The host URL of Umami Analytics.
- data_domains: `string` The domain of Umami Analytics.

plausible
: {{< version 0.3.16 >}}\
`map` Plausible Analytics Configuration.

- data_domain: `string` Plausible Analytics domain.
- src: `string` The script URL of Plausible Analytics.

cloudflare
: {{< version 0.3.16 >}}\
`map` Cloudflare Analytics Configuration.

- token: `string` Cloudflare Analytics token.

splitbee
: {{< version 0.3.16 >}}\
`map` Splitbee Analytics Configuration.

- enable: `bool` Whether to enable Splitbee Analytics. Default is `false`.
- no_cookie: `bool` Whether to use no cookie mode. Default is `true`.
- do_not_track: `bool` Whether to respect the do not track setting of the browser. Default is `true`.
- data_token: `string` Splitbee Analytics token.

### cookieconsent

`map` Cookie consent Configuration.
Expand Down
54 changes: 54 additions & 0 deletions content/zh-cn/documentation/getting-started/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,23 @@ thumbnailUrl
[params.analytics.fathom]
id = ""
server = ""
[params.analytics.baidu]
id = ""
[params.analytics.umami]
data_website_id = ""
src = ""
data_host_url = ""
data_domains = ""
[params.analytics.plausible]
data_domain = ""
src = ""
[params.analytics.cloudflare]
token = ""
[params.analytics.splitbee]
enable = false
no_cookie = true
do_not_track = true
data_token = ""
```

enable
Expand All @@ -1154,6 +1171,43 @@ fathom
- id: `string` Fathom Analytics ID。
- server: `string` Fathom Analytics 服务器地址。

baidu
: {{< version 0.3.16 >}}\
`map` 百度统计配置。

- id: `string` 百度分析 ID。

umami
: {{< version 0.3.16 >}}\
`map` Umami Analytics 配置。

- data_website_id: `string` Umami 分析网站 ID。
- src: `string` Umami 分析脚本 URL。
- data_host_url: `string` Umami 分析主机 URL。
- data_domains: `string` Umami 分析域。

plausible
: {{< version 0.3.16 >}}\
`map` Plausible Analytics 配置。

- data_domain: `string` Plausible 分析域。
- src: `string` Plausible 分析脚本 URL。

cloudflare
: {{< version 0.3.16 >}}\
`map` Cloudflare Analytics 配置。

- token: `string` Cloudflare Analytics 令牌。

splitbee
: {{< version 0.3.16 >}}\
`map` Splitbee Analytics 配置。

- enable: `bool` 是否启用 Splitbee Analytics。默认为 `false`
- no_cookie: `bool` 是否使用无 cookie 模式。默认为 `true`
- do_not_track: `bool` 是否尊重浏览器的不跟踪设置。默认为 `true`
- data_token: `string` Splitbee Analytics 令牌。

### cookieconsent

`map` Cookie 许可配置。
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"lint:md": "autocorrect content --lint && markdownlint-cli2 \"content/**/*.md\"",
"prepare": "husky install",
"build": "hugo --gc --minify --logLevel info",
"server": "hugo server -D --disableFastRender --navigateToChanged --ignoreCache -O",
"server": "hugo server -D --disableFastRender --navigateToChanged --ignoreCache --renderToMemory -O",
"server:production": "npm run server -- -e production",
"server:development": "cross-env HUGO_MODULE_WORKSPACE=hugo.work npm run server -- --ignoreVendorPaths \"**\"",
"update:theme": "hugo mod get -u github.com/hugo-fixit/FixIt@dev && hugo mod tidy"
Expand Down

0 comments on commit b45e8f4

Please sign in to comment.