Commit b9fd010d1c

b9fd010d1c483ae982e5cf76f491dcbc351cb9ed

parent: 15f0d530ac

Verified · cmc

cmc <hello@cleberg.net> · 2026-03-13 22:08 UTC

fix python syntax warnings

Layout: unified · split

build.py +11 −5
@@ -183,7 +183,6 @@ def get_recent_posts_html(content_dir="./content/blog", num_posts=3):
183183
184184 # Build HTML lines
185185 lines = []
186 current_year = None
187186 for post in recent:
188187 lines.append('\t<li class="post-list-item">')
189188 lines.append(f'\t\t<time datetime="{post["date_str"]}">{post["date_full"]}</time>')
@@ -404,13 +403,19 @@ def generate_tags_page(content_dir="./content/blog", build_dir="./.build"):
404403 for line in f:
405404 if not title:
406405 m = header_patterns["title"].match(line)
407 if m: title = m.group(1).strip(); continue
406 if m:
407 title = m.group(1).strip()
408 continue
408409 if not date_str:
409410 m = header_patterns["date"].match(line)
410 if m: date_str = m.group(1); continue
411 if m:
412 date_str = m.group(1)
413 continue
411414 if not slug:
412415 m = header_patterns["slug"].match(line)
413 if m: slug = m.group(1).strip(); continue
416 if m:
417 slug = m.group(1).strip()
418 continue
414419 if not tags:
415420 m = header_patterns["tags"].match(line)
416421 if m:
@@ -419,7 +424,8 @@ def generate_tags_page(content_dir="./content/blog", build_dir="./.build"):
419424 continue
420425 m = header_patterns["draft"].match(line)
421426 if m and m.group(1).strip().lower() != "nil":
422 is_draft = True; break
427 is_draft = True
428 break
423429 if title and date_str and slug and tags:
424430 break
425431