Skip to content

Commit

Permalink
Merge pull request #6 from bioscan-ml/doc_google-analytics
Browse files Browse the repository at this point in the history
DOC: Add Google Analytics to READTHEDOCS documentation builds
  • Loading branch information
scottclowe authored Feb 8, 2025
2 parents 644988d + 6240a30 commit e8eaa64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ def setup(app):
# but only available on Python 3.6 and above.
extensions.append("sphinx_search.extension")

# Some extensions should only be run if we are on Read the Docs
if os.environ.get("READTHEDOCS") == "True":
extensions.append("sphinxcontrib.googleanalytics")

# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
Expand Down Expand Up @@ -303,3 +307,7 @@ def setup(app):

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# -- Options for Google Analytics extension ----------------------------------

googleanalytics_id = "G-9F4YTY8WM2"
1 change: 1 addition & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ readthedocs-sphinx-search; python_version>='3.6'
sphinx>=6.0.0
sphinx-autobuild
sphinx_rtd_theme
sphinxcontrib-googleanalytics>=0.4
watchdog<1.0.0; python_version<'3.6'

0 comments on commit e8eaa64

Please sign in to comment.