Skip to content

Commit

Permalink
Add Plausible Analytics to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Mar 13, 2024
1 parent 3d6cd1c commit a7150ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
13 changes: 13 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "!layout.html" %}

{% block extrahead %}
{{ super() }}

{% if READTHEDOCS %}
<script defer data-domain="{{ plausible_domain }}" src="https://plausible.io/js/script.js"></script>
{% endif %}
{% endblock extrahead %}

{% block document %}
{{ super() }}
{% endblock document %}
19 changes: 8 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_context = {
'conf_py_path': '/docs/',
'display_github': True,
'github_user': 'SkypLabs',
'github_repo': 'probequest',
'github_version': 'develop',
"plausible_domain": 'probequest.skyplabs.net',
}

# -- Extension configuration -------------------------------------------------

Expand All @@ -79,14 +87,3 @@

# Fontpath for seqdiag (truetype font).
seqdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'


# -- Options for GitHub integration ------------------------------------------

html_context = {
'display_github': True, # Integrate GitHub
'github_user': 'SkypLabs', # Username
'github_repo': 'probequest', # Repo name
'github_version': 'develop', # Version
'conf_py_path': '/docs/', # Path in the checkout to the docs root
}

0 comments on commit a7150ca

Please sign in to comment.