Disable analytics when working local #6441
Replies: 2 comments 1 reply
-
One option if you cannot solve this with environment variables is configuration inheritance, which would mean having a local Not entirely sure if there perhaps a better one. Perhaps someone else will chime in. |
Beta Was this translation helpful? Give feedback.
-
The approach we've been following for the last few years is what @alexvoss suggested – use an environment variable and define it as a secret in your CI build. This ensures that analytics are only collected for the live site. Lines 104 to 106 in d363f90 For GitHub Actions, set |
Beta Was this translation helpful? Give feedback.
-
I am probably missing something but how would i disable parts of my mkdocs.yml when working localy?
I know of the group plugin but that only works in the plugins part of the config file?
I could override the analytics js to add a simple check but feels a bid hacky.
Beta Was this translation helpful? Give feedback.
All reactions