We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cddba20 commit f5f087aCopy full SHA for f5f087a
build_docs.py
@@ -520,10 +520,11 @@ def build_sitemap(www_root: Path, group):
520
return
521
with open(HERE / "templates" / "sitemap.xml", encoding="UTF-8") as template_file:
522
template = jinja2.Template(template_file.read())
523
- with open(www_root / "sitemap.xml", "w", encoding="UTF-8") as sitemap_file:
524
- sitemap_file.write(
525
- template.render(languages=LANGUAGES, versions=VERSIONS) + "\n"
526
- )
+ sitemap_file = www_root / "sitemap.xml"
+ sitemap_file.write_text(
+ template.render(languages=LANGUAGES, versions=VERSIONS) + "\n",
+ encoding="UTF-8"
527
+ )
528
sitemap_file.chmod(0o664)
529
run(["chgrp", group, sitemap_file])
530
0 commit comments