From 443801d412f98c56117420c0850116921e25529d Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 28 Aug 2024 18:45:50 +0200 Subject: Add plausible to docs. --- docs/conf.py | 12 +++++++++++- docs/installation.rst | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index d47f4fc..0f9ac1d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,8 @@ extensions = [ 'sphinx.ext.linkcode', 'sphinx_paramlinks', 'sphinx_design', - 'nbsphinx' + 'nbsphinx', + 'sphinx_plausible', ] # Add any paths that contain templates here, relative to this directory. @@ -253,3 +254,12 @@ def linkcode_resolve(domain, info): return "https://github.com/J08nY/pyecsca-codegen/tree/master/%s.py" % filename else: return "https://github.com/J08nY/pyecsca/tree/master/%s.py" % filename + + +plausible_domain = "pyecsca.org" +plausible_script = "https://plausible.neuromancer.sk/js/script.js" +plausible_enabled = ( + 'GITHUB_ACTION' in os.environ + and os.environ.get('GITHUB_REPOSITORY', '').lower() == 'J08nY/pyecsca' + and os.environ.get('GITHUB_REF') == 'refs/heads/main' + ) diff --git a/docs/installation.rst b/docs/installation.rst index 2917e01..1777a98 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -121,6 +121,7 @@ Requirements - nbsphinx_ - sphinx-paramlinks_ - sphinx-design_ + - sphinx-plausible_ Codegen ======= @@ -191,6 +192,7 @@ inside the notebook repository. .. _nbsphinx: https://nbsphinx.readthedocs.io/ .. _sphinx-paramlinks: https://pypi.org/project/sphinx-paramlinks/ .. _sphinx-design: https://pypi.org/project/sphinx_design/ +.. _sphinx-plausible: https://pypi.org/project/sphinx-plausible/ .. _Explicit-Formulas Database: https://www.hyperelliptic.org/EFD/index.html .. _crocs-muni/efd: https://github.com/crocs-muni/efd .. _ChipWhisperer: https://chipwhisperer.com -- cgit v1.2.3-70-g09d2