@@ -371,12 +371,27 @@ delete `sidebar-motoko.mjs`.
371371carry ` sidebar_position: 4 ` . Fix so values are unique and match the numeric
372372filename order.
373373
374- Three files have no frontmatter at all and will receive a generated title from the
375- sync script as a fallback. Adding explicit frontmatter upstream is preferred:
374+ ** Add ` title: ` and ` description: ` frontmatter to every file, and remove the H1
375+ heading from the body.** Starlight requires ` title: ` as a schema field — without
376+ it the build fails. All 68 synced upstream files currently carry ` # Title ` as an
377+ H1 heading (Docusaurus convention) but have no ` title: ` in frontmatter. The
378+ developer-docs postprocessor currently bridges this by extracting the H1 as
379+ ` title: ` and adding a generic ` description: "Motoko language documentation" `
380+ fallback. Moving this into the upstream source eliminates that extraction step and
381+ is a prerequisite for the symlink approach.
376382
377- - ` fundamentals/2-actors/7-mixins.md ` — add ` title ` , ` description ` , and ` sidebar_position: 7 `
378- - ` fundamentals/10-contextual-dot.md ` — add ` title ` , ` description ` , and ` sidebar_position `
379- - ` fundamentals/11-implicit-parameters.md ` — add ` title ` , ` description ` , and ` sidebar_position `
383+ The ` title: ` value is derived from the existing H1 heading. ` description: ` should
384+ be a genuine one-line summary for each page; the postprocessor's generic fallback
385+ is acceptable as a placeholder during the transition.
386+
387+ After adding ` title: ` frontmatter, remove the ` # Title ` H1 from the body — Starlight
388+ renders the page heading from ` title: ` frontmatter and would show it twice otherwise.
389+
390+ Three files have no frontmatter at all:
391+
392+ - ` fundamentals/2-actors/7-mixins.md ` — add ` title ` , ` description ` , and ` sidebar: { order: 7 } `
393+ - ` fundamentals/10-contextual-dot.md ` — add ` title ` , ` description ` , and ` sidebar: { order: N } `
394+ - ` fundamentals/11-implicit-parameters.md ` — add ` title ` , ` description ` , and ` sidebar: { order: N } `
380395
381396### 3. Use ` <motokoExamples> ` paths for file-embed blocks
382397
@@ -785,9 +800,24 @@ the developer-docs repo. The copy approach keeps synced content committed, so
785800every submodule bump produces a reviewable ` git diff ` showing exactly what changed.
786801Both are valid; the copy is preferred for auditability.
787802
788- ` postprocess-motoko.mjs ` can be deleted entirely. The ` remark-include-file `
789- build plugin already handles ` <motokoExamples> ` paths at build time — no
790- sync-time file expansion is needed.
803+ ` postprocess-motoko.mjs ` can be deleted entirely once §2 is fully completed
804+ upstream, including adding ` title: ` and ` description: ` frontmatter to every file
805+ and removing the ` # Title ` H1 heading from the body. Without ` title: ` in the
806+ upstream frontmatter, Starlight's build schema validation fails; this is a hard
807+ prerequisite for the symlink approach.
808+
809+ Once §2 lands, the postprocessor's H1-extraction step becomes a no-op and the
810+ remaining tasks split by approach:
811+
812+ - ** Copy approach (preferred for auditability):** the postprocessor rewrites
813+ ` docs.internetcomputer.org/<path> ` links to root-relative ` /<path> ` internal
814+ links. Every submodule bump produces a reviewable ` git diff ` .
815+ - ** Symlink approach:** ` docs.internetcomputer.org/ ` links remain as absolute
816+ external URLs pointing to the consumer site itself (self-referential but
817+ acceptable). Bumping the submodule is the entire update.
818+
819+ In both cases, ` <motokoExamples> ` paths are handled by ` remark-include-file ` at
820+ build time — no sync-time file expansion is needed.
791821
792822` sidebar.mjs ` changes after the upstream PR:
793823- ` icp-features/ ` — switch to ` autogenerate: { directory: "languages/motoko/icp-features" } ` .
0 commit comments