diff options
author | Christian Cleberg <hello@cleberg.net> | 2025-09-04 16:49:49 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2025-09-04 16:49:49 -0500 |
commit | 96964fe6f8a2e4de7fcf85a859e3ec890dd5dca7 (patch) | |
tree | 79502d636c2e363bec7fe6fd36934de646d09f69 /build.py | |
parent | 8d53754c22fb4db81948d0147511723a87a1c8b7 (diff) | |
download | cleberg.net-96964fe6f8a2e4de7fcf85a859e3ec890dd5dca7.tar.gz cleberg.net-96964fe6f8a2e4de7fcf85a859e3ec890dd5dca7.tar.bz2 cleberg.net-96964fe6f8a2e4de7fcf85a859e3ec890dd5dca7.zip |
shift from monospace theme to a formalized serif theme
Diffstat (limited to 'build.py')
-rw-r--r-- | build.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -174,6 +174,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") except ValueError: # Skip files with invalid date format continue @@ -183,6 +184,7 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): "title": title, "date_str": date_str, "date_obj": date_obj, + "date_full": date_full, "slug": slug, "tags": tags, } @@ -198,9 +200,6 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): lines = [] for post in recent: lines.append('\t<div class="post">') - lines.append( - f'\t\t<time datetime="{post["date_str"]}">{post["date_str"]}</time>' - ) lines.append('\t\t<div class="post-content">') lines.append( f'\t\t\t<a href="/blog/{post["slug"]}.html">{post["title"]}</a>' @@ -211,6 +210,9 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3): lines.append(f'\t\t\t\t<span class="tag">{tag}</span>') lines.append("\t\t\t</div>") lines.append("\t\t</div>") + lines.append( + f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>' + ) lines.append("\t</div>") return "\n".join(lines) |