Skip to content

Commit

Permalink
Added Plausible.io tracking to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Oct 8, 2022
1 parent 521bdd1 commit 7231987
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/_templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "!base.html" %}
{% block extrahead %}
{% if enable_plausible %}
<script defer data-domain="vpype.readthedocs.io" data-api="https://sta.abeyeler.workers.dev/sta/event" src="https://sta.abeyeler.workers.dev/sta/script.js"></script>
{% endif %}
{{ super() }}
{% endblock %}
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7231987

Please sign in to comment.