From 5a3f49931fce827a18d175069f2b9d534229c16d Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Fri, 20 Oct 2023 16:43:44 +0100 Subject: [PATCH] Added the sphinx-sitemap package to generate a xml sitemap to submit to google search console. --- {{cookiecutter.package_name}}/docs/requirements.txt | 1 + {{cookiecutter.package_name}}/docs/source/conf.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/{{cookiecutter.package_name}}/docs/requirements.txt b/{{cookiecutter.package_name}}/docs/requirements.txt index b5a754c..27a2626 100644 --- a/{{cookiecutter.package_name}}/docs/requirements.txt +++ b/{{cookiecutter.package_name}}/docs/requirements.txt @@ -5,3 +5,4 @@ pydata-sphinx-theme setuptools-scm sphinx sphinx-autodoc-typehints +sphinx-sitemap diff --git a/{{cookiecutter.package_name}}/docs/source/conf.py b/{{cookiecutter.package_name}}/docs/source/conf.py index 041962d..e4f4d28 100644 --- a/{{cookiecutter.package_name}}/docs/source/conf.py +++ b/{{cookiecutter.package_name}}/docs/source/conf.py @@ -41,6 +41,7 @@ "sphinx.ext.autosummary", "sphinx.ext.viewcode", "sphinx.ext.intersphinx", + "sphinx-sitemap", "myst_parser", "nbsphinx", ] @@ -113,6 +114,7 @@ # https://www.sphinx-doc.org/en/master/usage/extensions/githubpages.html github_user = "{{cookiecutter.github_username_or_organization}}" html_baseurl = f"https://{github_user}.github.io/{project}" +sitemap_url_scheme = "{link}" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files,