diff --git a/scripts/generate_site.py b/scripts/generate_site.py index a3ad9dfaf..1509f07ee 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -7180,8 +7180,10 @@ def system_pages( _section_label(manufacturer, console), _install_pairs(installs.get(console, []), lead, consumers)) - def region_block(console: str) -> list[str]: - return sitemeasurements.region_section(_REGION_RESULTS.get((slug, console), [])) + def region_block(console: str, level: int = 3) -> list[str]: + # Under the console's heading on a maker's page, a section of its + # own on the console's page. + return sitemeasurements.region_section(_REGION_RESULTS.get((slug, console), []), level) def all_sections() -> dict[str, list[Card]]: anchors: set[str] = set() @@ -7373,7 +7375,7 @@ def system_pages( lines.extend(_romset_note({console: consoles[console]})) lines.extend(install_block(console)) if index == 0: - lines.extend(region_block(console)) + lines.extend(region_block(console, 2)) lines.extend(["## Files", ""]) lines.extend(_cards_markdown(part)) lines.append("") diff --git a/scripts/sitemeasurements.py b/scripts/sitemeasurements.py index bce1c0fa1..2fb31a85d 100644 --- a/scripts/sitemeasurements.py +++ b/scripts/sitemeasurements.py @@ -409,11 +409,11 @@ VARIANT_WORDS = {"full": "every regional BIOS", "own": "its own region's BIOS on "others": "the other regions' BIOS only", "pack": "the region's pack"} -def region_section(results: list[dict]) -> list[str]: +def region_section(results: list[dict], level: int = 3) -> list[str]: """What the region runs showed for one system, with the records.""" if not results: return [] - lines = ["### Region check", "", + lines = ["#" * level + " Region check", "", f"Each game ran with {VARIANT_WORDS['own']}, then with {VARIANT_WORDS['others']} " f"([method](../{METHOD_PAGE})).", ""] for result in results: