From 77d7ab36de3cd5b26f8da8b4c79b8a10956b9697 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:50:46 +0200 Subject: [PATCH] fix: open each part of a split list on its own The files-to-source table outgrew one page and split in two. Both parts opened on the same intro, which is the page description, and validate_site refused the duplicate. Each part now opens on "Part n of N.". The element-budget exception for the unsplit table is gone: the parts hold 8,987 and 7,674 elements. --- scripts/generate_site.py | 5 ++++- scripts/validate_site.py | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/generate_site.py b/scripts/generate_site.py index 704f9be8..a9d1e95c 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -2755,9 +2755,12 @@ def _list_pages( stems = [stem + (f"-{n}" if n > 1 else "") for n in range(1, len(runs) + 1)] for n, (here, run) in enumerate(zip(stems, runs), 1): part = f" (part {n} of {len(runs)})" if len(runs) > 1 else "" + # The page description is the opening of the intro: parts sharing + # one read as duplicates to search and to validate_site. + opening = f"Part {n} of {len(runs)}. {intro}" if len(runs) > 1 else intro moved[here] = "\n".join([ "---", "level: reference", *_parent_front_matter(parent), "---", "", - f"# {title}{part}", "", intro, "", + f"# {title}{part}", "", opening, "", *([", ".join(f"[part {i}]({other}.md)" if other != here else f"part {i}" for i, other in enumerate(stems, 1)), ""] if len(runs) > 1 else []), *head, *run, "", _date_line(), diff --git a/scripts/validate_site.py b/scripts/validate_site.py index c5205df0..7e6932ae 100644 --- a/scripts/validate_site.py +++ b/scripts/validate_site.py @@ -58,10 +58,7 @@ MAX_PAGE_BYTES = 1_000_000 # index now carries each card's id on the link itself. MAX_PAGE_ELEMENTS = 10_000 # Pages allowed past it, each with the reason, removed when it comes under. -OVER_ELEMENT_BUDGET = { - # One table of every file to source, 10,193 elements on 2026-10-23. - "gaps-files-to-source/index.html": "the file table is not split", -} +OVER_ELEMENT_BUDGET: dict[str, str] = {} # Pagefind loads its index in pieces: the metadata, then the chunks the words # typed fall in (stored compressed). 59 KB for the largest chunk and 7.5 KB of # metadata on 2026-10-22, 5.2 MB for the whole index on disk.