makerst: Disallow user-contributed notes on the class index page

User-contributed notes are still allowed on individual class pages.
This commit is contained in:
Hugo Locurcio 2023-11-17 10:51:29 +01:00
parent ad72de5083
commit c7f6504105
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C

View File

@ -1536,8 +1536,9 @@ def make_rst_index(grouped_classes: Dict[str, List[str]], dry_run: bool, output_
else:
f = open(os.path.join(output_dir, "index.rst"), "w", encoding="utf-8")
# Remove the "Edit on Github" button from the online docs page.
f.write(":github_url: hide\n\n")
# Remove the "Edit on Github" button from the online docs page, and disallow user-contributed notes
# on the index page. User-contributed notes are allowed on individual class pages.
f.write(":github_url: hide\n:allow_comments: False\n\n")
# Warn contributors not to edit this file directly.
# Also provide links to the source files for reference.