From e3a8787c02281f6e6ddbe94a1db0701a474a7b6b Mon Sep 17 00:00:00 2001 From: Antoine Beyeler <49431240+abey79@users.noreply.github.com> Date: Sat, 8 Oct 2022 19:15:51 +0200 Subject: [PATCH] Migrated to Plausible.io (from Google Analytics) for vpype.readthedocs.io (#546) --- CHANGELOG.md | 3 ++- docs/_templates/base.html | 7 +++++++ docs/conf.py | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 docs/_templates/base.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 072b95c6..cbf3b7dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,8 @@ Release date: UNRELEASED ### Other changes * [Poetry](https://python-poetry.org) 1.2 or later is not required (developer only) (#541) -* A `justfile` is now provided for most common operations (install, build the documentation, etc.) (#541) +* A `justfile` is now provided for most common operations (install, build the documentation, etc.) (#541) +* Migrated to [Plausible.io](https://plausible.io) (from Google Analytics) for [vpype.readthedocs.io](https://vpype.readthedocs.io) (#546) ## 1.11 diff --git a/docs/_templates/base.html b/docs/_templates/base.html new file mode 100644 index 00000000..e6ba4351 --- /dev/null +++ b/docs/_templates/base.html @@ -0,0 +1,7 @@ +{% extends "!base.html" %} +{% block extrahead %} + {% if enable_plausible %} + + {% endif %} + {{ super() }} +{% endblock %} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 7e006521..48a91ea1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -79,6 +79,11 @@ """ +# -- Plausible support +ENABLE_PLAUSIBLE = os.environ.get("READTHEDOCS_VERSION_TYPE", "") in ["branch", "tag"] +html_context = {"enable_plausible": ENABLE_PLAUSIBLE} + + # noinspection PyUnusedLocal def autodoc_skip_member(app, what, name, obj, skip, options): # noinspection PyBroadException