diff --git a/changes/2708.misc.rst b/changes/2708.misc.rst new file mode 100644 index 0000000000..36f0fffc82 --- /dev/null +++ b/changes/2708.misc.rst @@ -0,0 +1,2 @@ +Add a robots.txt to disallow search engines to show unstable docs versions. +Created a new folder for it and configured Sphinx to find it. diff --git a/docs/conf.py b/docs/conf.py index 8ceba40f04..00d529bd08 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -372,3 +372,5 @@ def autodoc_process_signature( # If this is True, todolist produce output without file path and line, The default is False. # todo_link_only = False + +html_extra_path = ["extra"] diff --git a/docs/extra/robots.txt b/docs/extra/robots.txt new file mode 100644 index 0000000000..e99e1396d6 --- /dev/null +++ b/docs/extra/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /en/latest/ +Disallow: /en/v* +Allow: /en/stable/