4 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
4973a55b47 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.21.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.21.0...v3.21.2)
- [github.com/psf/black-pre-commit-mirror: 25.9.0 → 25.11.0](https://github.com/psf/black-pre-commit-mirror/compare/25.9.0...25.11.0)
2025-12-01 21:31:32 +00:00
Simon Li
1df02de795 Merge pull request #1050 from jasongrout/plausible
Add plausible stats tracking, consolidated with jupyter.org stats
2025-11-18 12:02:59 +00:00
pre-commit-ci[bot]
181aa975f5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-17 19:01:13 +00:00
Jason Grout
243fcf7be0 Add plausible stats tracking, consolidated with jupyter.org stats
This PR is similar to https://github.com/jupyter/jupyter/pull/797
2025-11-17 11:59:37 -07:00
2 changed files with 13 additions and 2 deletions

View File

@@ -11,7 +11,7 @@
repos:
# Autoformat: Python code, syntax patterns are modernized
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
rev: v3.21.2
hooks:
- id: pyupgrade
args:
@@ -37,7 +37,7 @@ repos:
# Autoformat: Python code
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
rev: 25.11.0
hooks:
- id: black

View File

@@ -138,3 +138,14 @@ rediraffe_redirects = {
"howto/env/notebook-interfaces": "howto/user-env/notebook-interfaces",
"howto/env/server-resources": "howto/user-env/server-resources",
}
def setup(app):
# Enable Plausible.io stats
app.add_js_file(
"https://plausible.io/js/pa-B75UO5--FNXYQSG7GBWkf.js", loading_method="async"
)
app.add_js_file(
filename=None,
body="window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};plausible.init({hashBasedRouting:true})",
)