fix: settle the round 3 site packages together

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 11:12:12 +02:00
1 parent d168ceb8a8
commit f0e7d87def
10 files changed
+44 -11

No files matched your search

+1 -1
View File
@@ -3207,7 +3207,7 @@ SAFE_LINK = "[Is it safe?](../index.md#is-it-safe)"
# Under "From your computer": a device with no network installs from the ZIP
# (`--from-pack`). The id is the one wiki/installer.md gives its section.
OFFLINE_LINE = ("No internet on the device? "
"[Install from the ZIP](../wiki/installer.md#without-a-network).")
"[Install from the ZIP](../wiki/installer.md#without-a-network-offline-install).")
# Shown in the "On the device" tab of a guide that has no `terminal:` of its own.
DEVICE_TERMINAL_FALLBACK = "Or fill the folder from your computer, with the ZIP."
+3 -3
View File
@@ -319,9 +319,9 @@ OG_DIR = Path(__file__).resolve().parent.parent / "docs_assets" / "og"
def og_image(rel: str, level: str) -> str:
"""The sharing card's address: the page's own when it has one, else
its section's."""
own = re.fullmatch(r"platforms/([a-z0-9_-]+)\.md", rel)
if own and own[1] != "index" and (OG_DIR / "platforms" / f"{own[1]}.png").is_file():
return f"{SITE_URL}assets/og/platforms/{own[1]}.png"
own = re.fullmatch(r"(platforms|systems)/([a-z0-9_-]+)\.mdx?", rel)
if own and own[2] != "index" and (OG_DIR / own[1] / f"{own[2]}.png").is_file():
return f"{SITE_URL}assets/og/{own[1]}/{own[2]}.png"
return f"{SITE_URL}assets/og/{og_section(rel, level)}.png"