Browse Source

Add custom robots.txt to docs

Coen van der Kamp 4 years ago
parent
commit
4702b6f14d
2 changed files with 9 additions and 1 deletions
  1. 1 1
      docs/conf.py
  2. 8 0
      docs/robots.txt

+ 1 - 1
docs/conf.py

@@ -163,7 +163,7 @@ html_static_path = ['_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 = ['robots.txt']
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.

+ 8 - 0
docs/robots.txt

@@ -0,0 +1,8 @@
+User-agent: *
+
+# Only index `/en/stable/`
+Disallow: /en/v*/
+Disallow: /en/latest/
+Disallow: /*/pdf/
+
+Sitemap: https://docs.wagtail.io/sitemap.xml