From b28311f914d54179997611408e4fb9c1585297c3 Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Thu, 18 Dec 2025 22:27:37 +0100 Subject: [PATCH 1/3] try updated theme version --- .readthedocs.yaml | 2 +- docs/source/conf.py | 7 +++++++ docs/source/robots.txt | 12 ++++++++++++ pyproject.toml | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 docs/source/robots.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 97c4f5a3..587b7b97 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-lts-latest tools: - python: "3.11" + python: "3.12" # You can also specify other tool versions: # nodejs: "16" # rust: "1.55" diff --git a/docs/source/conf.py b/docs/source/conf.py index 71157af3..d359e822 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,6 +63,7 @@ "notfound.extension", "sphinx_copybutton", "sphinx_design", + "sphinx_sitemap", "sphinx_togglebutton", ] @@ -134,11 +135,16 @@ "html_admonition", ] +# sitemap extension configuration +site_url = "https://causalpy.readthedocs.io/" +sitemap_url_scheme = f"{{lang}}{version}/{{link}}" + # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = "labs_sphinx_theme" html_static_path = ["_static"] +html_extra_path = ["robots.txt"] html_favicon = "_static/favicon_logo.png" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -156,6 +162,7 @@ "github_version": "main", "doc_path": "docs/source/", "default_mode": "light", + "baseurl": "https://causalpy.readthedocs.io/", } # -- Options for autodoc ---------------------------------------------------- diff --git a/docs/source/robots.txt b/docs/source/robots.txt new file mode 100644 index 00000000..9fe284a5 --- /dev/null +++ b/docs/source/robots.txt @@ -0,0 +1,12 @@ +# Custom robots.txt file +# It controls the crawling and indexing of your documentation by search engines. +# Part of the configuration happens through readthedocs and part through extensions +# +# You can learn more about robots.txt, including how to customize it, in our rtd docs: +# +# * Our documentation on Robots.txt: https://docs.readthedocs.com/platform/stable/reference/robots.html +# * Our guide about SEO techniques: https://docs.readthedocs.com/platform/stable/guides/technical-docs-seo-guide.html + +User-agent: * + +Sitemap: https://causalpy.readthedocs.io/en/stable/sitemap.xml diff --git a/pyproject.toml b/pyproject.toml index 0523c3c1..a9d10747 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ docs = [ "sphinx", "sphinx-autodoc-typehints", "sphinx_autodoc_defaultargs", - "labs-sphinx-theme", + "labs-sphinx-theme @ git+https://github.com/pymc-labs/labs-sphinx-theme@v016_update", "sphinx-copybutton", "sphinx-rtd-theme", "statsmodels", From 3f33bbbc2768ab8a3ef8d1689ea34ad10997744d Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Thu, 18 Dec 2025 22:34:41 +0100 Subject: [PATCH 2/3] add sitemap extension as dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index a9d10747..946508dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,6 +83,7 @@ docs = [ "labs-sphinx-theme @ git+https://github.com/pymc-labs/labs-sphinx-theme@v016_update", "sphinx-copybutton", "sphinx-rtd-theme", + "sphinx-sitemap", "statsmodels", "sphinxcontrib-bibtex", "sphinx-notfound-page", From 183b0fedf9ae379c9b7fe2c62003356f65b3bc2a Mon Sep 17 00:00:00 2001 From: "Oriol (ProDesk)" Date: Thu, 18 Dec 2025 22:46:14 +0100 Subject: [PATCH 3/3] remove incorrect html_context --- docs/source/conf.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index d359e822..8b497faa 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -174,12 +174,3 @@ # Don't show class signature with the class' name. autodoc_class_signature = "separated" - -# Add "Edit on Github" link. Replaces "view page source" ---------------------- -html_context = { - "display_github": True, # Integrate GitHub - "github_user": "pymc-labs", # Username - "github_repo": "CausalPy", # Repo name - "github_version": "master", # Version - "conf_py_path": "/docs/source/", # Path in the checkout to the docs root -}