mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
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.
This commit is contained in:
1 parent
c826e0fc05
commit
77d7ab36de
2 files changed
+5
-5
No files matched your search
@@ -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(),
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user