Fix Sphinx documentation issues, add RTD configuration

This commit is contained in:
Peter Bittner 2025-04-04 14:06:03 +02:00
parent a112ec445f
commit 1dd5b2ac62
5 changed files with 34 additions and 16 deletions

18
.readthedocs.yaml Normal file
View file

@ -0,0 +1,18 @@
# Read the Docs configuration file
# https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.12"
sphinx:
configuration: docs/conf.py
# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt

View file

@ -26,7 +26,7 @@ application to :const:`INSTALLED_APPS` in your project
Next you need to add the Google Analytics template tag to your Next you need to add the Google Analytics template tag to your
templates. This step is only needed if you are not using the generic templates. This step is only needed if you are not using the generic
:ttag:`analytical.*` tags. If you are, skip to :ttag:`analytical.*` tags. If you are, skip to
:ref:`google-analytics-configuration`. :ref:`google-analytics-configuration-gtag`.
The Google Analytics tracking code is inserted into templates using a The Google Analytics tracking code is inserted into templates using a
template tag. Load the :mod:`google_analytics_gtag` template tag library and template tag. Load the :mod:`google_analytics_gtag` template tag library and
@ -43,7 +43,7 @@ template. Insert the tag at the bottom of the HTML head::
... ...
.. _google-analytics-configuration: .. _google-analytics-configuration-gtag:
Configuration Configuration
============= =============
@ -54,7 +54,7 @@ code, you also need to set-up the domain. Finally, you can add custom
segments for Google Analytics to track. segments for Google Analytics to track.
.. _google-analytics-property-id: .. _google-analytics-gtag-property-id:
Setting the property ID Setting the property ID
----------------------- -----------------------

View file

@ -26,7 +26,7 @@ application to :const:`INSTALLED_APPS` in your project
Next you need to add the Google Analytics template tag to your Next you need to add the Google Analytics template tag to your
templates. This step is only needed if you are not using the generic templates. This step is only needed if you are not using the generic
:ttag:`analytical.*` tags. If you are, skip to :ttag:`analytical.*` tags. If you are, skip to
:ref:`google-analytics-configuration`. :ref:`google-analytics-configuration-js`.
The Google Analytics tracking code is inserted into templates using a The Google Analytics tracking code is inserted into templates using a
template tag. Load the :mod:`google_analytics_js` template tag library and template tag. Load the :mod:`google_analytics_js` template tag library and
@ -43,7 +43,7 @@ template. Insert the tag at the bottom of the HTML head::
... ...
.. _google-analytics-configuration: .. _google-analytics-configuration-js:
Configuration Configuration
============= =============
@ -54,7 +54,7 @@ code, you also need to set-up the domain. Finally, you can add custom
segments for Google Analytics to track. segments for Google Analytics to track.
.. _google-analytics-property-id: .. _google-analytics-js-property-id:
Setting the property ID Setting the property ID
----------------------- -----------------------
@ -117,7 +117,7 @@ By default, display advertising features are disabled.
.. _`Display Advertising features`: https://support.google.com/analytics/answer/3450482 .. _`Display Advertising features`: https://support.google.com/analytics/answer/3450482
.. _google-analytics-internal-ips: .. _google-analytics-js-internal-ips:
Internal IP addresses Internal IP addresses
--------------------- ---------------------
@ -131,7 +131,7 @@ setting, the tracking code is commented out. It takes the value of
important information about detecting the visitor IP address. important information about detecting the visitor IP address.
.. _google-analytics-custom-variables: .. _google-analytics-js-custom-variables:
Custom variables Custom variables
---------------- ----------------
@ -165,7 +165,7 @@ context processor, the latter clobbers the former.
.. _`custom variables`: https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#custom-vars .. _`custom variables`: https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#custom-vars
.. _google-analytics-anonimyze-ips: .. _google-analytics-js-anonimyze-ips:
Anonymize IPs Anonymize IPs
------------- -------------
@ -183,7 +183,7 @@ By default, IPs are not anonymized.
.. _`IP anonymization`: https://support.google.com/analytics/bin/answer.py?hl=en&answer=2763052 .. _`IP anonymization`: https://support.google.com/analytics/bin/answer.py?hl=en&answer=2763052
.. _google-analytics-sample-rate: .. _google-analytics-js-sample-rate:
Sample Rate Sample Rate
----------- -----------
@ -199,7 +199,7 @@ integer value.
.. _`Sample Rate`: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#sampleRate .. _`Sample Rate`: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#sampleRate
.. _google-analytics-site-speed-sample-rate: .. _google-analytics-js-site-speed-sample-rate:
Site Speed Sample Rate Site Speed Sample Rate
---------------------- ----------------------
@ -218,7 +218,7 @@ integer value.
.. _google-analytics-cookie-expiration: .. _google-analytics-cookie-expiration:
Cookie Expiration Cookie Expiration
---------------------- -----------------
You can configure the `Cookie Expiration`_ feature by setting the You can configure the `Cookie Expiration`_ feature by setting the
:const:`GOOGLE_ANALYTICS_COOKIE_EXPIRATION` configuration setting:: :const:`GOOGLE_ANALYTICS_COOKIE_EXPIRATION` configuration setting::
@ -230,7 +230,7 @@ The value is the cookie expiration in seconds or 0 to delete the cookie when the
.. _`Cookie Expiration`: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_setsessioncookietimeout .. _`Cookie Expiration`: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_setsessioncookietimeout
Custom Javascript Source Custom Javascript Source
---------------------- ------------------------
You can configure a custom URL for the javascript file by setting the You can configure a custom URL for the javascript file by setting the
:const:`GOOGLE_ANALYTICS_JS_SOURCE` configuration setting:: :const:`GOOGLE_ANALYTICS_JS_SOURCE` configuration setting::

View file

@ -1,6 +1,6 @@
================================== ====================================================
Matomo (formerly Piwik) -- open source web analytics Matomo (formerly Piwik) -- open source web analytics
================================== ====================================================
Matomo_ is an open analytics platform currently used by individuals, Matomo_ is an open analytics platform currently used by individuals,
companies and governments all over the world. companies and governments all over the world.

View file

@ -59,7 +59,7 @@ commands = bandit {posargs:-r analytical} -v
description = Clean up bytecode and build artifacts description = Clean up bytecode and build artifacts
skip_install = true skip_install = true
deps = pyclean deps = pyclean
commands = pyclean {posargs:. --debris --erase requirements.txt tests/unittests-report.xml --yes} commands = pyclean {posargs:. --debris --erase requirements.txt docs/_build/**/* docs/_build/ tests/unittests-report.xml --yes}
[testenv:docs] [testenv:docs]
description = Build the HTML documentation description = Build the HTML documentation