Skip to content

Commit e1a8438

Browse files
committed
add robots.txt to specify doc versions to appear in search engines
1 parent dcbd3b4 commit e1a8438

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
# Add any extra paths that contain custom files (such as robots.txt or
273273
# .htaccess) here, relative to this directory. These files are copied
274274
# directly to the root of the documentation.
275-
#html_extra_path = []
275+
html_extra_path = ["docs/robots.txt"]
276276

277277
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
278278
# using the given strftime format.

docs/robots.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
User-agent: *
2+
Allow: /*/latest/
3+
Allow: /en/latest/ # Fallback for bots that don't understand wildcards
4+
Allow: /*/5.3.x/
5+
Allow: /en/5.3.x/ # Fallback for bots that don't understand wildcards
6+
Disallow: /

0 commit comments

Comments
 (0)