Skip to content

Commit 1be7976

Browse files
committed
Add a robots.txt that only allows crawl of the latest English documentation.
This discourages crawl and index for other versions of the documentation. Search engines often direct users to the other versions, which are usually not what the user is looking for.
1 parent 7ea3813 commit 1be7976

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
# a list of builtin themes.
7474
#
7575
html_baseurl = "https://pyrtl.readthedocs.io/en/latest"
76+
html_extra_path = ["html_root"]
7677
html_theme = "furo"
7778
html_theme_options = {
7879
"sidebar_hide_name": True,

docs/html_root/robots.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Only crawl the latest English documentation.
2+
User-agent: *
3+
Disallow: /
4+
Allow: /en/latest/
5+
6+
Sitemap: https://pyrtl.readthedocs.io/sitemap.xml

0 commit comments

Comments
 (0)