Remove em-dashes from the wiki generator + README (#95)
Sync course wiki / sync-wiki (push) Successful in 5s

Co-authored-by: claude <claude@jpaul.io>
Co-committed-by: claude <claude@jpaul.io>
This commit was merged in pull request #95.
This commit is contained in:
2026-06-22 23:25:31 -04:00
committed by Claude (agent)
parent c098933f25
commit 66c15800c3
2 changed files with 45 additions and 31 deletions
+11 -11
View File
@@ -3,11 +3,11 @@
Host-agnostic: this writes Markdown into a target wiki working directory. A thin
per-host CI wrapper clones the host's `<repo>.wiki.git`, runs this script, then
commits and pushes. The same script feeds both the Gitea and GitHub wikis only
commits and pushes. The same script feeds both the Gitea and GitHub wikis; only
the `--host` URL flavor and the CI wrapper differ.
The wiki is GENERATED BUILD OUTPUT. Never hand-edit it; edit modules/ and let CI
re-render. Labs are NOT copied into the wiki lesson pages link to the runnable
re-render. Labs are NOT copied into the wiki; lesson pages link to the runnable
files back in the main repo. Each page gets prev/next navigation so the wiki reads
like a textbook.
@@ -24,11 +24,11 @@ from pathlib import Path
# Unit structure (module numbers), from the syllabus. Drives the textbook nav.
UNITS = [
("Unit 1 Get out of the chat window", range(1, 8)),
("Unit 2 Make it shareable, reviewable, recoverable", range(8, 13)),
("Unit 3 Automate the checking and shipping", range(13, 20)),
("Unit 4 Extend the AI into your systems", range(20, 24)),
("Unit 5 AI in the Loop", range(24, 28)),
("Unit 1: Get out of the chat window", range(1, 8)),
("Unit 2: Make it shareable, reviewable, recoverable", range(8, 13)),
("Unit 3: Automate the checking and shipping", range(13, 20)),
("Unit 4: Extend the AI into your systems", range(20, 24)),
("Unit 5: AI in the Loop", range(24, 28)),
]
@@ -48,7 +48,7 @@ def first_h1(text: str, fallback: str) -> str:
def short_title(h1: str) -> str:
"""'Module 1 The Copy-Paste Problem' -> 'The Copy-Paste Problem'."""
"""'Module 1: The Copy-Paste Problem' -> 'The Copy-Paste Problem'."""
m = re.match(r"^Module\s+\d+\s*[—:-]\s*(.+)$", h1)
return m.group(1).strip() if m else h1
@@ -78,7 +78,7 @@ def rewrite_repo_file_links(body: str, web_base: str, branch: str, host: str) ->
def banner(source_path: str, source_url: str) -> str:
return (
f"> 📖 _This page is generated from [`{source_path}`]({source_url}). "
f"**Edit the source, not the wiki** edits here are overwritten on the next sync. "
f"**Edit the source, not the wiki**; edits here are overwritten on the next sync. "
f"Run the hands-on labs from the repo, linked inline._\n"
)
@@ -153,7 +153,7 @@ def main() -> int:
cap_title = None
if cap.exists():
body = cap.read_text(encoding="utf-8")
cap_title = first_h1(body, "Capstone The Full Loop")
cap_title = first_h1(body, "Capstone: The Full Loop")
seq.append({"page": "capstone", "label": cap_title, "body": body, "slug": None})
# --- pass 2: write each page with banner + prev/next nav --------------
@@ -212,7 +212,7 @@ def main() -> int:
home.append("")
home.append(
"\n---\n> 📖 _This wiki is generated from the "
f"[course repo]({args.web_base}) edit `modules/` there, not these pages._"
f"[course repo]({args.web_base}); edit `modules/` there, not these pages._"
)
(out / "Home.md").write_text("\n".join(home) + "\n", encoding="utf-8")