aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2025-08-22 19:42:00 -0500
committerChristian Cleberg <hello@cleberg.net>2025-08-22 19:42:00 -0500
commit77d96ed137d81319aed8f4870ba36fb72aebcf29 (patch)
tree98e0c8024f750f74ac4c883db42e87aef8303aa9
parentdaa00431bbb7493a09178021d8bcfbd792155777 (diff)
downloadcleberg.net-77d96ed137d81319aed8f4870ba36fb72aebcf29.tar.gz
cleberg.net-77d96ed137d81319aed8f4870ba36fb72aebcf29.tar.bz2
cleberg.net-77d96ed137d81319aed8f4870ba36fb72aebcf29.zip
remove unecessary print statement and fix deprecated UTC function call
-rw-r--r--build.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/build.py b/build.py
index 00019e6..d765019 100644
--- a/build.py
+++ b/build.py
@@ -291,7 +291,7 @@ def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"):
loc = f"{base_url}{url_path}"
# Last modified time
- lastmod = datetime.utcfromtimestamp(
+ lastmod = datetime.fromtimestamp(
os.path.getmtime(full_path)
).strftime("%Y-%m-%d")
@@ -306,7 +306,6 @@ def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"):
</urlset>
"""
# Write to .build/sitemap.xml
- print(build_dir)
sitemap_path = os.path.join(build_dir, "sitemap.xml")
with open(sitemap_path, "w", encoding="utf-8") as f:
f.write(sitemap_xml)