Commit 2aceaf0d49

2aceaf0d49d4655b2802a863a04b1c01f1a0405b

parent: d308865805

Unsigned

cmc <hello@cleberg.net> · 2025-08-23 00:42 UTC

remove unecessary print statement and fix deprecated UTC function call

Layout: unified · split

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