更新 build.py

This commit is contained in:
cxykevin 2024-06-29 22:19:26 +08:00
parent 8dff2f9ffd
commit 02e755f236
1 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,3 @@
import os import os
#################################### ####################################
## CONFIG/配置 ## ## CONFIG/配置 ##
@ -44,15 +43,15 @@ print()
print("Write to sitemap.xml ...") print("Write to sitemap.xml ...")
xml_tmpl_start = """<?xml version="1.0" encoding="UTF-8"?> xml_tmpl_start = """<?xml version="1.0" encoding="UTF-8"?>
<urlset> <urlset>
<url>
""" """
xml_tmpl_link = """ xml_tmpl_link = """
<url>
<loc>{}</loc> <loc>{}</loc>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
<priority>0.9</priority> <priority>0.9</priority>
</url>
""" """
xml_tmpl_end = """ </url> xml_tmpl_end = """</urlset>
</urlset>
""" """
with open(roots+os.sep+"sitemap.xml", "w") as file: with open(roots+os.sep+"sitemap.xml", "w") as file:
file.write(xml_tmpl_start) file.write(xml_tmpl_start)