From e629cb8abe09429e0426cdae64abb9f8eea5c68c Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sun, 1 Jan 2023 19:22:30 +0100 Subject: [PATCH] Add SEO items (sitemap and robots.txt) to docs --- docs/conf.py | 2 ++ docs/robots.txt | 3 +++ requirements/documentation.txt | 1 + 3 files changed, 6 insertions(+) create mode 100644 docs/robots.txt diff --git a/docs/conf.py b/docs/conf.py index afc0e26..6c1f984 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,6 +49,7 @@ "sphinx_argparse_cli", "sphinx_copybutton", "sphinxext.opengraph", + "sphinx_sitemap", ] # Add any paths that contain templates here, relative to this directory. @@ -114,6 +115,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ["static"] +html_extra_path = ["robots.txt"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000..5f81211 --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,3 @@ +User-agent: * + +Sitemap: https://cli.geotribu.fr/sitemap.xml diff --git a/requirements/documentation.txt b/requirements/documentation.txt index 6d0f171..1958e71 100644 --- a/requirements/documentation.txt +++ b/requirements/documentation.txt @@ -8,3 +8,4 @@ sphinx-argparse-cli>=1,<2 sphinx-autobuild==2021.3.14 sphinx-copybutton<1 sphinxext-opengraph>=0.4,<1 +sphinx-sitemap>=2.4,<3