Commit 2aceaf0d49
Unsigned
Layout: unified · split
build.py +1 −2
| @@ -291,7 +291,7 @@ def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"): | ||
| 291 | 291 | loc = f"{base_url}{url_path}" |
| 292 | 292 | |
| 293 | 293 | # Last modified time |
| 294 | lastmod = datetime.utcfromtimestamp( | |
| 294 | lastmod = datetime.fromtimestamp( | |
| 295 | 295 | os.path.getmtime(full_path) |
| 296 | 296 | ).strftime("%Y-%m-%d") |
| 297 | 297 | |
| @@ -306,7 +306,6 @@ def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"): | ||
| 306 | 306 | </urlset> |
| 307 | 307 | """ |
| 308 | 308 | # Write to .build/sitemap.xml |
| 309 | print(build_dir) | |
| 310 | 309 | sitemap_path = os.path.join(build_dir, "sitemap.xml") |
| 311 | 310 | with open(sitemap_path, "w", encoding="utf-8") as f: |
| 312 | 311 | f.write(sitemap_xml) |