mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
feat: build the site with Astro Starlight
generate_site.py writes the Starlight project in website/ and nothing else: mkdocs.yml, the MkDocs hooks, theme overrides and stylesheet go, and the wiki is written in Starlight's syntax. Both workflows set up Node with the official actions/setup-node pinned by commit, run npm ci from the committed lockfile, build with the strict link validator and check the result with validate_site.py. The search weighs a page by what it answers: Start here pages first, a system page's cards and file names before a guide citing them, deep guides, launchers, aliases and frozen copies after. Status badges, hash blocks and the export change lists leave the index. The ranking sits at the centre of a range where the 13 queries of search_gate.py all answer, in the search box itself. 839 pages, every URL and 45,611 ids match the MkDocs build. The tests read the Starlight content and syntax.
This commit is contained in:
1 parent
abe240073c
commit
123d698e43
64 files changed
+742
-3118
No files matched your search
+8
-6
@@ -24,8 +24,8 @@ Steps, numbered as the run prints them:
|
||||
5 consistency check verify == pack: counts, paths, every emulator pack
|
||||
6 --verify-packs pack integrity, extraction and hashes
|
||||
7 generate_readme.py README.md and CONTRIBUTING.md
|
||||
8 generate_site.py MkDocs pages
|
||||
8b mkdocs build --strict rendered as the site deploy renders it, then validate_site.py
|
||||
8 generate_site.py site pages, into the Starlight project in website/
|
||||
8b npm run build (website/) rendered as the site deploy renders it, then validate_site.py
|
||||
|
||||
--offline skips 2 to 2b2 and the network side of 2e and 4: release assets
|
||||
come from .cache/large/ only.
|
||||
@@ -1102,13 +1102,15 @@ def main() -> None:
|
||||
if args.skip_docs:
|
||||
skip_notice("render_site", "--skip-docs")
|
||||
results["render_site"] = SKIPPED
|
||||
elif shutil.which("mkdocs") is None:
|
||||
skip_notice("render_site", "mkdocs not installed")
|
||||
elif shutil.which("npm") is None or not Path("website/node_modules").is_dir():
|
||||
skip_notice("render_site", "Node not set up: npm ci --prefix website")
|
||||
results["render_site"] = SKIPPED
|
||||
else:
|
||||
ok, _ = run(["mkdocs", "build", "--strict"], STEP_LABELS["render_site"])
|
||||
# Starlight's link check runs inside the build and fails it.
|
||||
ok, _ = run(["npm", "run", "build", "--prefix", "website"], STEP_LABELS["render_site"])
|
||||
if ok:
|
||||
ok, _ = run([sys.executable, "scripts/validate_site.py"], "8b validate site")
|
||||
ok, _ = run([sys.executable, "scripts/validate_site.py", "--site-dir", "website/dist"],
|
||||
"8b validate site")
|
||||
results["render_site"] = ok
|
||||
all_ok = all_ok and ok
|
||||
|
||||
|
||||
Reference in new issue
Block a user