mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
fix: read the platform guides on first use
model.guides read and checked _registry.yml and _guides.yml at import, from the repository: a pack build died on a registry entry without a guide before parsing its options, and a site run on another platforms folder took the repository's guides. The guides now load on first use, keyed on siteinputs.current().platforms, behind accessor functions.
This commit is contained in:
1 parent
9f987adb8c
commit
e8b3cef5d5
31 files changed
+290
-204
No files matched your search
@@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from model import releaserecord
|
||||
from model.guides import DEVICE_GROUPS, GROUP_TILES, GUIDES
|
||||
from model.guides import device_groups, group_tiles, platform_guides
|
||||
from resolve.nativemode import check_label
|
||||
from sitegen import markup
|
||||
from sitegen.guidepage import NO_ZIP_FAQ
|
||||
@@ -25,7 +25,7 @@ def generate_platform_index(coverages: dict, registry: dict | None = None) -> st
|
||||
"Each setup's page gives the folder and the command.",
|
||||
"",
|
||||
]
|
||||
for group, (label, _description) in DEVICE_GROUPS.items():
|
||||
for group, (label, _description) in device_groups().items():
|
||||
members = group_members(coverages, registry, group)
|
||||
if not members:
|
||||
continue
|
||||
@@ -34,10 +34,10 @@ def generate_platform_index(coverages: dict, registry: dict | None = None) -> st
|
||||
# follow, as on the home tiles.
|
||||
lines += [f"## {label}", ""]
|
||||
lines += markup.card_grid([
|
||||
*((f"[{coverages[name]['platform']}]({name}.md)", [GUIDES[name].summary])
|
||||
*((f"[{coverages[name]['platform']}]({name}.md)", [platform_guides()[name].summary])
|
||||
for name in members),
|
||||
*((f"[{tile.name}](../{tile.link})", [tile.text])
|
||||
for tile in GROUP_TILES.get(group, ())),
|
||||
for tile in group_tiles().get(group, ())),
|
||||
])
|
||||
lines += [
|
||||
f"Comparing setups? [Every setup side by side](../{SETUP_TABLE_LINK})",
|
||||
|
||||
Reference in new issue
Block a user