diff options
| author | Christian Cleberg <[email protected]> | 2025-09-04 16:49:49 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2025-09-04 16:49:49 -0500 |
| commit | 8ed9f60af1f1a3beca8f114db0175ce31f17822d (patch) | |
| tree | 79502d636c2e363bec7fe6fd36934de646d09f69 /build.py | |
| parent | 6e2e2844688e87c73e7840ff4b2989136ce247d4 (diff) | |
| download | cleberg.net-8ed9f60af1f1a3beca8f114db0175ce31f17822d.tar.gz cleberg.net-8ed9f60af1f1a3beca8f114db0175ce31f17822d.tar.bz2 cleberg.net-8ed9f60af1f1a3beca8f114db0175ce31f17822d.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) |
