docs: sync Motoko language docs from caffeinelabs/motoko@1.5.1#125
Merged
docs: sync Motoko language docs from caffeinelabs/motoko@1.5.1#125
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/sync-motoko.sh— syncsdocs/languages/motoko/from.sources/motokosubmodule (caffeinelabs/motoko@1.5.1)scripts/postprocess-motoko.mjs— removes duplicate H1s, rewrites relative links, redirects core library links to mops.one and unsynced pages to docs.motoko.orgnpm run sync:motokoto package.jsonfundamentals/(44 pages),icp-features/(7 pages),reference/(3 pages), plusbase-core-migration.mdSync recommendation
sync from caffeinelabs/motoko doc/md/