From c5ddea05b5421a0abd549406f300dc5e3968e3c5 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 23 Mar 2026 10:48:47 -0500 Subject: publish Domain Dig link --- build.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build.py') diff --git a/build.py b/build.py index b3e04a4..f109ce3 100644 --- a/build.py +++ b/build.py @@ -34,6 +34,16 @@ from datetime import datetime from pathlib import Path +def run_ruff(): + print("Running ruff...") + for cmd in [["ruff", "check", "--fix"], ["ruff", "format"]]: + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + if result.returncode != 0: + print(f"ruff error ({' '.join(cmd)}):") + print(result.stderr, file=sys.stderr) + sys.exit(1) + + def update_index_html(html_snippet, template_path="./.build/index.html"): """ Read the index.html file at `template_path`, replace everything between @@ -558,6 +568,7 @@ def start_dev_server(build_dir): def main(): + run_ruff() html_snippet = get_recent_posts_html("./content/blog", num_posts=3) build_dir = Path(".build") -- cgit v1.2.3