From 05d80472bdfd8cc12e5234b31c2a836b7679d4aa Mon Sep 17 00:00:00 2001 From: Derek Miller <1340081+derek-miller@users.noreply.github.com> Date: Tue, 10 Nov 2026 10:36:17 -0600 Subject: [PATCH] feat(drivercentral): a facts strip not yet uploaded is left out of the description, with a build warning --- template/CONTRIBUTING.md.jinja | 5 +++++ template/Makefile.jinja | 3 +++ template/tools/docs.py | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index 2ddb148..9cbbd5c 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -317,6 +317,11 @@ shows it. The product card, the banners and the listing photos are copied from upload. When it has expired, run the Build workflow on the tag again from the Actions tab. +While `description.md` still has `FACTS-STRIP-URL` for the facts strip, +`description.html` leaves the strip out and the build prints a warning. Upload +`banners/facts-strip-2400x136.png` through DriverCentral's description editor +and put the URL it gives in its place. + Step 1 rewrites tracked files in place. Formatting covers `tools/*.py`, all Lua under `drivers/`, `src/`, `test/`, `tools/` and `vendor/`, and every Markdown file at the repo root, under `documentation/`, and under diff --git a/template/Makefile.jinja b/template/Makefile.jinja index 7dbc9db..0347de0 100644 --- a/template/Makefile.jinja +++ b/template/Makefile.jinja @@ -209,6 +209,9 @@ docs-drivercentral: preprocess $(VENV_STAMP) $(VENV_PY) tools/docs.py description \ resources/drivercentral/description.md dist/drivercentral/listing/description.html; \ fi + @if grep -q FACTS-STRIP-URL resources/drivercentral/description.md 2>/dev/null; then \ + echo "::warning file=resources/drivercentral/description.md::The facts strip isn't uploaded to DriverCentral yet, so description.html has no facts strip. Upload banners/facts-strip-2400x136.png through the description editor and put its URL in place of FACTS-STRIP-URL."; \ + fi @cd resources/drivercentral 2>/dev/null || exit 0; \ for f in product-card-300x300.png banners/*.png photos/*.png; do \ [ -f "$$f" ] || continue; \ diff --git a/template/tools/docs.py b/template/tools/docs.py index e391868..d813291 100755 --- a/template/tools/docs.py +++ b/template/tools/docs.py @@ -418,9 +418,16 @@ def revisions(input_path: Path, output_path: Path) -> None: output_path.write_text(html, encoding="utf-8") +_STRIP_PLACEHOLDER_RE = re.compile( + r'(?:
)?]*src="FACTS-STRIP-URL"[^>]*>(?: