summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-08-17 09:48:17 -0400
committerDan Halbert <halbert@halwitz.org>2020-08-17 09:49:46 -0400
commite1a843878e4272334869b1db4a8222ae344f5cb8 (patch)
tree9202013b31b97469aed72acdc396fea4e120abf7
parentdcbd3b4994bdbaa3d6b14788191b6d95524f0e66 (diff)
add robots.txt to specify doc versions to appear in search engines
-rw-r--r--conf.py2
-rw-r--r--docs/robots.txt6
2 files changed, 7 insertions, 1 deletions
diff --git a/conf.py b/conf.py
index 4a8b72584..f7d028c19 100644
--- a/conf.py
+++ b/conf.py
@@ -272,7 +272,7 @@ html_static_path = ['docs/static']
# 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_extra_path = ["docs/robots.txt"]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
diff --git a/docs/robots.txt b/docs/robots.txt
new file mode 100644
index 000000000..39a4eaeed
--- /dev/null
+++ b/docs/robots.txt
@@ -0,0 +1,6 @@
+User-agent: *
+Allow: /*/latest/
+Allow: /en/latest/ # Fallback for bots that don't understand wildcards
+Allow: /*/5.3.x/
+Allow: /en/5.3.x/ # Fallback for bots that don't understand wildcards
+Disallow: /