[Docs]: Only enable Plausible on deployment builds (#2162)
Tested locally.
This commit is contained in:
parent
0cbc279773
commit
8ba18f2360
7
.github/workflows/docs-publish.yaml
vendored
7
.github/workflows/docs-publish.yaml
vendored
@ -1,7 +1,7 @@
|
||||
name: Publish Docs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
@ -21,4 +21,7 @@ jobs:
|
||||
- name: Generate Helm Chart Index
|
||||
run: python ./scripts/generate-helm-index.py > ./frontend/docs/docs/helm-repo/index.yaml
|
||||
|
||||
- run: cd frontend/docs; mkdocs gh-deploy --force
|
||||
- name: Build Docs
|
||||
run: cd frontend/docs; mkdocs gh-deploy --force
|
||||
env:
|
||||
ENABLE_ANALYTICS: true
|
||||
|
@ -0,0 +1,4 @@
|
||||
{% if config.extra.enable_analytics %}
|
||||
<script defer data-domain="docs.browsertrix.com" src="https://p.webrecorder.net/js/script.outbound-links.js"></script>
|
||||
<script>window.plausible = window.plausible || function () { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
||||
{% endif %}
|
@ -124,6 +124,9 @@ extra:
|
||||
link: https://digipres.club/@webrecorder
|
||||
- icon: bootstrap/youtube
|
||||
link: https://www.youtube.com/@webrecorder
|
||||
analytics:
|
||||
provider: plausible
|
||||
enable_analytics: !ENV ENABLE_ANALYTICS
|
||||
copyright: "Creative Commons Attribution 4.0 International (CC BY 4.0)"
|
||||
|
||||
plugins:
|
||||
|
Loading…
Reference in New Issue
Block a user