This guide explains how to merge upstream docfx content into this repository and fix the regressions that the automated sync introduces.
The docs/angular/src/content/ directory originates from igniteui-docfx (the vnext branch). Periodically, a PR is opened on this repo that brings in bulk content changes via a squash-merge of the upstream. The content arrives as raw docfx Markdown (.md) and must be treated as MDX (/en = English, /jp = Japanese).
Common regressions introduced by the upstream sync:
| Pattern in upstream | Correct form in this repo |
|---|---|
[label]({environment:angularApiUrl}/.../.../classes/...) |
<ApiLink type="ClassName" /> |
[label]({environment:angularApiUrl}/.../.../members/...) |
<ApiLink type="ClassName" member="memberName" /> |
[link text](other-page.md) |
[link text](other-page) — no .md extension |
<code-view src="..."> |
<Sample src="..." height={N} /> |
>[!NOTE] / >[!TIP] callouts |
<DocsAside type="note"> / <DocsAside type="tip"> |
Unclosed <br> |
<br /> |
HTML comments <!-- ... --> outside code blocks |
Remove or replace with MDX-style {/* ... */} |
<!-- schema: --> |
Remove entirely |
suffix={false} missing on non-Component classes |
Restore from master |
prefixed={false} missing on interface/enum/type types |
Restore from master |
Missing or overwritten llms.description |
Add or preserve a specific summary for the generated llms.txt index |
When a PR arrives from the automated sync, note the upstream tip commit (the last commit in igniteui-docfx that was merged) and the ancestor (the previous sync base). These are typically visible in the PR description or the merge commit message.
For scripting convenience, export them:
export ANCESTOR=<previous-sync-tip-commit> # e.g. c9c1248582
export LAST_SYNC=<new-upstream-tip-commit> # e.g. 9347b2861bgit checkout master
git pull
git checkout -b your-name/add-latest-docfx-changes
git merge origin/vnext # or however the upstream is trackedIf there are conflict files (files that changed both upstream and in master), the safest default for bulk-content files is:
# Accept upstream content for conflicted files
git checkout --theirs -- docs/angular/src/content/en/components/some-file.mdx
git add docs/angular/src/content/en/components/some-file.mdxWarning: "keep theirs" loses any MDX-specific fixes that were in master. Always run the quality check immediately after (step 3) to find what was lost.
node scripts/check-mdx-quality.mjsThis compares every changed .mdx file against master and reports:
- Raw
{environment:angularApiUrl}links that must become<ApiLink> .mdlink extensions that must be stripped- Lost
<ApiLink>components (files where the count dropped vs master) - Lost
<Sample>components - Other docfx artifacts (
<code-view>,>[!NOTE],<!-- schema: -->, unclosed<br>)
Auto-fix .md extensions:
node scripts/check-mdx-quality.mjs --fixCheck a specific directory (e.g. JP):
node scripts/check-mdx-quality.mjs --dir=docs/angular/src/content/jpCheck all files (not just changed ones):
node scripts/check-mdx-quality.mjs --allValidate English and Japanese LLM metadata after importing or resolving files:
npm run check:llms-metadataThis check does not modify content. Fix each reported source frontmatter block manually and preserve existing llms.description values when resolving sync conflicts.
For each file reported with raw {environment:angularApiUrl} links:
- Find what the line looked like on
master:git show master:docs/angular/src/content/en/components/FILENAME.mdx | grep -n "keyword"
- If master had an
<ApiLink>for this line, restore it exactly. - If master didn't have this line (it's new upstream content), convert manually:
[IgxFooComponent](url)→<ApiLink type="Foo" />[IgxFooComponent.bar](url)→<ApiLink type="Foo" member="bar" />[IFooEventArgs](url)→<ApiLink kind="interface" type="IFooEventArgs" suffix={false} prefixed={false} />[FooEnum](url)→<ApiLink kind="enum" type="FooEnum" />- See ApiLink rules below.
npm run angular:build-staging:en # should complete with no errors
npm run angular:build-staging:jp # same for JapanesePage counts should match master (or be higher if new pages were added). A large drop indicates missing imports or broken MDX.
git add -A
git commit -m "fix(sync): restore MDX components lost in docfx vnext merge"
git push origin your-name/add-latest-docfx-changesAngular docs use <ApiLink> without a pkg= prop for most types (defaults to pkg="core" which maps to igniteui-angular). Use pkg= only for sub-packages.
| Situation | Example |
|---|---|
| Component class | <ApiLink type="Grid" /> → IgxGridComponent |
| Directive (no Component suffix) | <ApiLink type="TooltipTargetDirective" suffix={false} /> |
| Utility class (no Component suffix) | <ApiLink type="FilteringOperand" suffix={false} /> |
| Interface (no Igx prefix, no suffix) | <ApiLink kind="interface" type="IGridEditEventArgs" suffix={false} prefixed={false} /> |
| Enum | <ApiLink kind="enum" type="GridSelectionMode" /> |
| Member (property/method) | <ApiLink type="Grid" member="filteringLogic" /> |
| Member with display label | <ApiLink type="Grid" member="rowEditEnter" label="rowEditEnter" /> |
| Charts sub-package | <ApiLink pkg="charts" type="CategoryChart" /> |
| Custom display text | <ApiLink type="Combo" label="igx-combo" /> |
Key props:
type— short name without platform prefix ("Grid"not"IgxGrid")kind—"class"(default),"interface","enum","type","variable","function"suffix—trueby default; setfalsefor directives, utilities, interfacesprefixed—trueby default; setfalsefor interfaces (IFoo), enums with noIgxprefix, functionsmember— property or method name (lowercase is fine, component normalises it)label— overrides the display text
Japanese content mirrors English structure under docs/angular/src/content/jp/. Apply the same fixes. The text is Japanese but the <ApiLink> components are identical to EN — use the EN file as the reference for what components should exist.
Japanese llms.description values must be written in Japanese. They should summarize the actual page content rather than translate English marketing boilerplate.
After fixing, verify that new <ApiLink> additions don't conflict with the skill rules:
- Read
.github/skills/xplat-docs-api-links/SKILL.mdfor the full rule set (primarily for xplat files, butkind,suffix,prefixedrules apply to angular too) - Angular docs do not use
pkg=for standardigniteui-angulartypes — this differs from the xplat skill which requires it - Compare suspicious ApiLink calls against the master version of the file to catch dropped
suffix={false}orprefixed={false}props
| File | Purpose |
|---|---|
scripts/check-mdx-quality.mjs |
Post-sync validation — detects raw API links, .md extensions, lost <ApiLink>/<Sample>, callouts, schema comments, unclosed <br>, markdown images |
scripts/merge-vnext-updates.mjs |
3-way body-only merge of docfx vnext updates into local .mdx files; update LAST_SYNC after each sync |
scripts/reimport-body.mjs |
Re-merge upstream body for files where initial "keep ours" resolution discarded substantive text; applies MDX transforms to resolved content |
scripts/convert-callouts.mjs |
Convert >[!NOTE/TIP/...] callouts to <DocsAside> and remove <!-- schema: --> comments in-place |
scripts/convert-img-tags.mjs |
Convert <img class="responsive-img"> tags to <Image> components from astro:assets |
scripts/migrate-vnext-new-files.mjs |
Apply full DocFX → MDX migration to newly-imported pages (frontmatter cleanup, callouts, code-view, images) |
DOCFX-SYNC.md |
This guide |
.github/skills/docfx-sync/SKILL.md |
AI agent skill for performing syncs |