Skip to content

docs: sync Motoko language docs from caffeinelabs/motoko@1.5.1#125

Merged
marc0olo merged 12 commits intomainfrom
docs/sync-motoko
Apr 18, 2026
Merged

docs: sync Motoko language docs from caffeinelabs/motoko@1.5.1#125
marc0olo merged 12 commits intomainfrom
docs/sync-motoko

Conversation

@marc0olo
Copy link
Copy Markdown
Member

Summary

  • Adds scripts/sync-motoko.sh — syncs docs/languages/motoko/ from .sources/motoko submodule (caffeinelabs/motoko@1.5.1)
  • Adds scripts/postprocess-motoko.mjs — removes duplicate H1s, rewrites relative links, redirects core library links to mops.one and unsynced pages to docs.motoko.org
  • Adds npm run sync:motoko to package.json
  • Syncs 65 pages across three sections: fundamentals/ (44 pages), icp-features/ (7 pages), reference/ (3 pages), plus base-core-migration.md
  • Closes infra: restore sync scripts #115

Sync recommendation

sync from caffeinelabs/motoko doc/md/

marc0olo added 12 commits April 18, 2026 01:31
Map :::info -> :::note and :::warn -> :::caution (unsupported types),
and convert space-separated titles to bracket syntax (:::note[Title]).

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
- Expand ```lang file=<path>``` blocks by reading the file from the
  submodule (fixes motoko-grammar showing empty content)
- Convert ```md reference\n<url>``` blocks to plain links
  (fixes changelog showing a raw URL code block)
- Fix aside title regex to use [^\S\n]+ instead of \s+ so that the
  first body line is not promoted to a title across a newline
- Strip dfx-specific paragraph from the changelog tip aside

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
The ```md reference block is Docusaurus syntax for embedding a remote
file. Resolve it by reading the file from the local submodule so the
full changelog content is preserved rather than replaced with a link.

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
The dfx-no-reference rule applies to hand-written docs; synced upstream
content should be reproduced faithfully.

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
- .github/workflows/sync-motoko.yml: weekly job that checks for new
  caffeinelabs/motoko releases, bumps the submodule, runs sync+build,
  and opens a PR automatically
- sync-motoko.sh: guard warns on unknown source sections and uses a
  glob for base-core-migration.md so a renamed numeric prefix doesn't
  silently skip it; writes warnings to /tmp for the workflow to include
  in the PR body
- postprocess-motoko.mjs: fix file= embed path resolution — probe at
  multiple subdirectory depths to handle files that were in nested
  source dirs before flattening

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
…te branches

- Normalize tag from gh release view (returns '1.5.1') to 'v1.5.1' to
  match the VERSIONS file format
- Skip PR creation if the branch already exists, preventing duplicate
  PRs on workflow_dispatch re-runs
- Replace nested heredoc with echo+--body-file to avoid YAML linter errors

Co-Authored-By: Marco Walz <marco.walz@dfinity.org>
@marc0olo marc0olo merged commit 8bd7681 into main Apr 18, 2026
2 checks passed
@marc0olo marc0olo deleted the docs/sync-motoko branch April 18, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

infra: restore sync scripts

1 participant