From e33985f9695e15638a0e6a5677a0adb445f8e9fa Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Sat, 29 Jan 2022 17:16:44 +0100 Subject: [PATCH] Disallow crawling of versioned documentation in robots.txt (#5549) --- docs/_html/robots.txt | 6 ++++++ docs/conf.py | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 docs/_html/robots.txt diff --git a/docs/_html/robots.txt b/docs/_html/robots.txt new file mode 100644 index 000000000..9d253d1bb --- /dev/null +++ b/docs/_html/robots.txt @@ -0,0 +1,6 @@ +User-agent: * +Disallow: / +Allow: /en/stable +Allow: /en/latest + +Sitemap: https://docs.discord.red/sitemap.xml diff --git a/docs/conf.py b/docs/conf.py index 3e007e507..3019fda8b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -118,6 +118,12 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}" # html_theme = "sphinx_rtd_theme" +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +html_extra_path = ["_html"] + # 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 # documentation.