diff --git a/docs/source/_html/robots.txt b/docs/source/_html/robots.txt new file mode 100644 index 0000000000..f5f081a8eb --- /dev/null +++ b/docs/source/_html/robots.txt @@ -0,0 +1,16 @@ +User-agent: * + +# Allow crawling of all paths +Allow: / + +# Override to disallow crawling of documentation +Disallow: /projects/docs/ + +# Override again to allow crawling of /latest documentation +Allow: /projects/docs/en/latest/ + +# Override again to allow crawling of /stable documentation +Allow: /projects/docs/en/stable/ + +# Custom sitemap +Sitemap: https://www.getdaft.io/sitemap-override.xml diff --git a/docs/source/_html/sitemap-override.xml b/docs/source/_html/sitemap-override.xml new file mode 100644 index 0000000000..0d27e95390 --- /dev/null +++ b/docs/source/_html/sitemap-override.xml @@ -0,0 +1,19 @@ + + + + https://www.getdaft.io/projects/docs/en/latest/ + daily + 1 + + + https://www.getdaft.io/projects/docs/en/stable/ + weekly + 0.9 + + + https://www.getdaft.io/ + monthly + 0.5 + + diff --git a/docs/source/conf.py b/docs/source/conf.py index b186fcb077..2a14d45aa0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -82,6 +82,9 @@ "learn/10-min": "../10-min.html", } +# Adds /_html folder which serves robots.txt and the sitemap +html_extra_path = ["_html"] + # Resolving code links to github # Adapted from: https://github.com/aaugustin/websockets/blob/778a1ca6936ac67e7a3fe1bbe585db2eafeaa515/docs/conf.py#L100-L134