更新 build.py
This commit is contained in:
parent
8dff2f9ffd
commit
02e755f236
7
build.py
7
build.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue