diff --git a/docs/source/conf.py b/docs/source/conf.py index a883f76bd6..cea2a550f8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -220,9 +220,11 @@ # html_extra_path used to define a path to robots.txt which is used by webcrawlers # to ignore or allow certain links. -# We've decided to rely on RTD's default robots.txt, so we no longer need to specify a custom one, -# see discussion at https://github.com/kedro-org/kedro/issues/3741 -# html_extra_path = [str(here / "robots.txt")] +# We've tried to rely on RTD's default `robots.txt`, but it doesn't support sub-projects (Viz and Datasets), +# so we decided to use our own `robots.txt` again, with a link to the custom `sitemap.xml`. +# See the discussion at https://github.com/kedro-org/kedro/issues/3741 +# and https://github.com/readthedocs/readthedocs.org/issues/6841 +html_extra_path = [str(here / "extra_files")] # Removes, from all docs, the copyright footer. html_show_copyright = False diff --git a/docs/source/extra_files/robots.txt b/docs/source/extra_files/robots.txt new file mode 100644 index 0000000000..b1a46f78e2 --- /dev/null +++ b/docs/source/extra_files/robots.txt @@ -0,0 +1,8 @@ +User-agent: * +Disallow: / + +Allow: /en/stable/ +Allow: /projects/kedro-viz/en/stable/ +Allow: /projects/kedro-datasets/en/latest/ + +Sitemap: https://docs.kedro.org/en/stable/sitemap.xml diff --git a/docs/source/sitemap.xml b/docs/source/extra_files/sitemap.xml similarity index 71% rename from docs/source/sitemap.xml rename to docs/source/extra_files/sitemap.xml index 059f1ac1c6..4b542d807a 100644 --- a/docs/source/sitemap.xml +++ b/docs/source/extra_files/sitemap.xml @@ -1,34 +1,31 @@ https://docs.kedro.org/en/stable/ - 2024-09-01T18:53:11.571849+00:00 + 2024-11-26T18:53:11.571849+00:00 monthly 1.0 https://docs.kedro.org/en/latest/ + 2024-11-26T18:53:11.571849+00:00 daily 0.5 https://docs.kedro.org/projects/kedro-viz/en/stable/ - 2024-09-01T18:53:11.571849+00:00 + 2024-11-26T18:53:11.571849+00:00 monthly 1.0 https://docs.kedro.org/projects/kedro-viz/en/latest/ + 2024-11-26T18:53:11.571849+00:00 daily 0.5 - - https://docs.kedro.org/projects/kedro-datasets/en/stable/ - 2024-09-01T18:53:11.571849+00:00 - monthly - 1.0 - https://docs.kedro.org/projects/kedro-datasets/en/latest/ + 2024-11-26T18:53:11.571849+00:00 daily 0.5