From acd2ef31fdf59dec06db5e3b22b65bec7fe898d0 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 04:41:13 +0100 Subject: [PATCH] fix: keep the Run by row out of the search Setup names on 530 emulator pages lowered their weight in the index and ranked the data page first for batocera folder and retroarch system folder. The row is left out of the search, as the card's setup lists are. --- scripts/generate_site.py | 7 ++++--- tests/test_site_emulators.py | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/generate_site.py b/scripts/generate_site.py index ebe4c6cf4..0b0943062 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -10130,9 +10130,10 @@ def emulator_pages( # The file cards name the setups whose own list holds a file: the # ones that run the emulator and pack its files were said nowhere. # Said once here: a line on each card put MAME's parts and four - # other pages over their element budget. - lines.append("| Run by | " + ", ".join( - f"[{_platform_display(p)}](../platforms/{p}.md)" for p in setups) + " |") + # other pages over their element budget. Out of the search: setup + # names on 530 pages ranked the data page first for "batocera folder". + lines.append(f"| Run by | " + ", ".join( + f"[{_platform_display(p)}](../platforms/{p}.md)" for p in setups) + " |") lines.append(f"| Profiled | {profiled} |") # The YAML is the reusable document this site renders, and the JSON is the # same profile for a program. diff --git a/tests/test_site_emulators.py b/tests/test_site_emulators.py index 2fde18825..e8421df90 100644 --- a/tests/test_site_emulators.py +++ b/tests/test_site_emulators.py @@ -785,6 +785,8 @@ class AnEmulatorPageNamesItsSetups(unittest.TestCase): row = next(line for line in text.splitlines() if line.startswith("| Run by |")) for setup in ("emudeck", "rocknix", "nextui", "retroarch"): self.assertIn(f"/platforms/{setup}/", row) + # Setup names on every emulator page outranked the setup's own page. + self.assertIn("data-pagefind-ignore", row) class SizesTheCodeComparesAreExact(unittest.TestCase):