diff options
author | Christian Cleberg <hello@cleberg.net> | 2025-10-14 23:20:22 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2025-10-14 23:20:22 -0500 |
commit | 8a569f85348033146bc018bd80ac343ef7ab39e8 (patch) | |
tree | 68f79e9a96c557182ee9c37454dd9707c233e17d /build.py | |
parent | c51633e2ede460f15aa260d94ddd1330a18a7011 (diff) | |
download | cleberg.net-8a569f85348033146bc018bd80ac343ef7ab39e8.tar.gz cleberg.net-8a569f85348033146bc018bd80ac343ef7ab39e8.tar.bz2 cleberg.net-8a569f85348033146bc018bd80ac343ef7ab39e8.zip |
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -162,7 +162,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): if title and date_str and slug: try: date_obj = datetime.strptime(date_str, "%Y-%m-%d") - date_full = date_obj.strftime("%B %d, %Y") + date_full = date_obj.strftime("%Y-%m-%d") except ValueError: # Skip files with invalid date format continue @@ -186,7 +186,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): # Build HTML lines lines = [] for post in recent: - lines.append('\t<div>') + lines.append('\t<div class="post">') lines.append( f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>' ) @@ -194,7 +194,6 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): f'\t\t\t<a href="/blog/{post["slug"]}.html">{post["title"]}</a>' ) lines.append("\t</div>") - lines.append("\t<br>") return "\n".join(lines) |