Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,16 @@ The cross-platform (xplat) documentation MDX source files live in this repositor

If content originates from or must be synced with the upstream [`igniteui-xplat-docs`](https://github.com/IgniteUI/igniteui-xplat-docs) repository, use the merge scripts in `scripts/` (e.g. `merge-vnext-updates.mjs`, `migrate-vnext-new-files.mjs`) to pull in updates rather than editing generated files directly.

## These topics are generated into the Angular tree — don't edit or commit them there
## These topics are served to Angular from xplat — don't copy them into the Angular tree

For **Angular**, the xplat output is compiled and copied over the Angular content tree on every build by `docs/angular/scripts/sync-generated.mjs` (run via `sync:generated-from-xplat` before every `angular:dev`/`angular:build`). It overwrites everything under `docs/angular/src/content/{en,jp}/components/` **except** `grids/`, `changelog/`, and `toc.json`, which stay Angular-owned.
For **Angular**, the xplat output is compiled to `docs/xplat/generated/Angular/{en,jp}/components/` by `xplat:generate`, which runs before every `angular:dev`/`angular:build`. The Angular site then reads that directory **in place**, as a second content root overlaid on `docs/angular/src/content/{lang}/components/`. Nothing is copied between the two trees, so the tracked Angular content never accumulates build output.

As a result these Angular copies (charts, geo-map, gauges, spreadsheet, excel-library, `general-changelog-dv`, etc.) are **not committed** — editing them under `docs/angular/` has no effect, so edit the xplat source instead. They are kept out of git by the `xplat-generated topics` block at the bottom of `docs/angular/src/content/en/.gitignore` and `docs/angular/src/content/jp/.gitignore`. If you add a **new** cross-platform topic group under `docs/xplat/src/content/`, add a matching pattern to those two `.gitignore` blocks so the generated Angular copy is not accidentally committed.
Both roots share one slug namespace — `<root>/charts/types/area-chart.mdx` is the page `/charts/types/area-chart` whichever root it came from — and **xplat always wins**: if a slug exists in both, the generated topic is served and the Angular file is ignored entirely. `grids/` and `changelog/` are excluded from the overlay and stay Angular-owned, as does `toc.json`, which drives the sidebar for both roots.

Two consequences worth knowing:

- Editing one of these topics under `docs/angular/` has no effect — edit `docs/xplat/src/content/` instead. Adding a new cross-platform topic needs no `.gitignore` change; it simply appears from the xplat root.
- A **committed** Angular topic that xplat also provides is dead weight: it is shadowed and never served, which almost always means the topic was moved to xplat without deleting the Angular copy. `node docs/angular/scripts/clean-synced.mjs` reports these (and deletes untracked leftovers from the old copy step with `--apply`).

# <a name='#adding-images'>Adding of images in the topic</a>

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/check-relative-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ jobs:

- run: npm ci

# Sync xplat-generated Angular content into docs/angular/src/content
# before scanning so the angular tree is complete (same as the angular build).
- name: Sync xplat → angular (en)
run: npm run sync:generated-from-xplat --prefix docs/angular
# Generate the xplat Angular overlay into docs/xplat/generated/Angular.
Comment thread
ChronosSF marked this conversation as resolved.
# The Angular site reads that tree in place (nothing is copied into
# docs/angular/src/content), and the link checker scans both roots, so
# the overlay has to exist before scanning — same as the angular build.
- name: Generate xplat Angular overlay (en)
run: npm run xplat:generate --prefix docs/angular

- name: Sync xplat → angular (jp)
run: npm run sync:generated-from-xplat:jp --prefix docs/angular
- name: Generate xplat Angular overlay (jp)
run: npm run xplat:generate:jp --prefix docs/angular

- name: Generate angular content (en)
run: npm run generate:en --prefix docs/angular
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ on:
branches: [ master, vnext ]

jobs:
unit-tests:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm test

build-and-verify:

runs-on: ubuntu-latest
Expand Down
11 changes: 8 additions & 3 deletions API-LINK-WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@ Use `--no-sync` only for a quick local resolver check when generated content is
Angular:

```text
npm run sync:generated-from-xplat --prefix docs/angular
npm run sync:generated-from-xplat:jp --prefix docs/angular
scan docs/angular/src/content
npm run xplat:generate --prefix docs/angular
npm run xplat:generate:jp --prefix docs/angular
scan docs/angular/src/content and docs/xplat/generated/Angular
```

The Angular site serves both roots — its own authored topics plus the xplat
generator's Angular output, overlaid in place rather than copied in — so the
checker scans both. Files the site never serves are skipped: the overlay's
`grids/` and `changelog/`, and authored topics that xplat shadows.

React, Web Components, and Blazor:

```text
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ The `.mdx` extension enables editor Go-to-Definition (Ctrl+Click). The `remarkMd

The Angular documentation is assembled from three sources before being checked:

1. **xplat sync** — `docs/xplat/src/content/` is generated into platform-specific output and then copied into `docs/angular/src/content/` by the sync scripts.
1. **xplat generation** — `docs/xplat/src/content/` is generated into platform-specific output under `docs/xplat/generated/Angular/`. The Angular site reads that directory in place as a second content root; it is never copied into `docs/angular/src/content/`.
2. **Grid generation** — `docs/angular/src/content/en/grids_templates/` and `jp/grids_templates/` are template files shared across all four grid types (Grid, TreeGrid, HierarchicalGrid, PivotGrid). `generate.mjs` expands them into the individual component pages under `docs/angular/src/content/en/components/grid/`, `treegrid/`, `hierarchicalgrid/`, and `pivotGrid/`. These template directories are excluded from link checking (same as xplat `_shared/`).
3. **Link check** — the checker scans the fully assembled `docs/angular/src/content/` tree.
3. **Link check** — the checker scans both Angular content roots (`docs/angular/src/content/` and `docs/xplat/generated/Angular/`) and resolves links across them, since a topic in one root may link to a topic served from the other.

The check must run **after** both steps above, otherwise it scans stale or incomplete files and misses links that only exist in generated output.

Expand Down Expand Up @@ -184,7 +184,7 @@ The check is read-only and reports the source file and line for missing or malfo

- Angular content lives under `docs/angular/src/content/<locale>/`.
- Shared xplat content lives under `docs/xplat/src/content/<locale>/`.
- Cross-platform topics are also generated into the Angular tree at build time (by `docs/angular/scripts/sync-generated.mjs`) and are therefore **not committed** under `docs/angular/` — they are gitignored, and editing those Angular copies has no effect. Edit the xplat source instead. See [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md#updating-of-data-visualization-related-topics).
- Cross-platform topics are generated to `docs/xplat/generated/Angular/` and overlaid on the Angular content at build time — they are never copied into `docs/angular/`, and xplat wins wherever both provide the same slug. Edit the xplat source; editing an Angular copy has no effect. See [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md#updating-of-data-visualization-related-topics).
- Static images and assets are stored in the nearest product package when product-specific, or in the root `public/` directory when shared.

## Collaboration Docs
Expand Down
15 changes: 15 additions & 0 deletions docs/angular/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ const site = mode === 'production' ? `${PROD_HOST}${base}`
const docsDir = path.join(__dirname, 'src', 'content', docsLang);
const componentsDocsDir = path.join(docsDir, 'components');
const templatesDir = path.join(docsDir, 'grids_templates');
// Topics generated from the shared cross-platform source, read straight out of
// the xplat generator's output. They override the Angular tree for any slug
// they provide, and nothing is ever copied into src/content — so the tracked
// content tree never accumulates build output. Absent for languages the xplat
// generator does not emit (kr), in which case there is simply no overlay.
//
// changelog/ and grids/ stay Angular-owned: xplat emits them too, but the site
// never serves those copies. This is the single source of truth for the overlay
// — createDocsSite publishes it as DOCS_SOURCE_PATHS, and src/content.config.ts
// reads it back from there.
const xplatOverlay = {
dir: path.join(__dirname, '..', 'xplat', 'generated', 'Angular', docsLang, 'components'),
exclude: ['changelog/**', 'grids/**'],
};
const localizedDescription: Partial<Record<NavLang, string>> = {
jp: 'Ignite UI for Angular のコンポーネントと API リファレンス ドキュメントです。',
kr: 'Ignite UI for Angular 컴포넌트 및 API 참조 문서입니다.',
Expand Down Expand Up @@ -85,6 +99,7 @@ export default createDocsSite({
source: {
tocPath: `${componentsDocsDir}/toc.json`,
docsDir: componentsDocsDir,
overlayDirs: [xplatOverlay],
},
head: [
{ tag: 'link', attrs: { rel: 'icon', href: `${mode !== 'development' ? base : ''}/favicon.ico`, type: 'image/x-icon' } },
Expand Down
29 changes: 15 additions & 14 deletions docs/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,24 @@
"generate:en": "node scripts/generate.mjs --lang=en",
"generate:jp": "node scripts/generate.mjs --lang=jp",
"generate:kr": "node scripts/generate.mjs --lang=kr",
"sync:generated-from-xplat": "npm run generate:angular --prefix ../xplat && node scripts/sync-generated.mjs --lang=en",
"sync:generated-from-xplat:jp": "npm run generate:angular:jp --prefix ../xplat && node scripts/sync-generated.mjs --lang=jp",
"dev": "npm run sync:generated-from-xplat && npm run generate && cross-env PLATFORM=Angular astro dev --port 4321",
"dev:en": "npm run sync:generated-from-xplat && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=en astro dev --port 4321",
"dev:jp": "npm run sync:generated-from-xplat:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=jp astro dev --port 4321",
"xplat:generate": "npm run generate:angular --prefix ../xplat",
"clean:synced": "node scripts/clean-synced.mjs",
"xplat:generate:jp": "npm run generate:angular:jp --prefix ../xplat",
"dev": "npm run xplat:generate && npm run generate && cross-env PLATFORM=Angular astro dev --port 4321",
"dev:en": "npm run xplat:generate && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=en astro dev --port 4321",
"dev:jp": "npm run xplat:generate:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=jp astro dev --port 4321",
"dev:kr": "npm run generate:kr && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=kr astro dev --port 4321",
"build": "npm run sync:generated-from-xplat && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 astro build --outDir=../../dist/angular",
"build:en": "npm run sync:generated-from-xplat && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=en astro build --outDir=../../dist/angular",
"build:jp": "npm run sync:generated-from-xplat:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build": "npm run xplat:generate && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 astro build --outDir=../../dist/angular",
"build:en": "npm run xplat:generate && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=en astro build --outDir=../../dist/angular",
"build:jp": "npm run xplat:generate:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build:kr": "npm run generate:kr && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_LANG=kr astro build --outDir=../../dist/angular-kr",
"build-staging": "npm run sync:generated-from-xplat && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production astro build --outDir=../../dist/angular",
"build-staging:en": "npm run sync:generated-from-xplat && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production DOCS_LANG=en astro build --outDir=../../dist/angular",
"build-staging:jp": "npm run sync:generated-from-xplat:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build-staging": "npm run xplat:generate && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production astro build --outDir=../../dist/angular",
"build-staging:en": "npm run xplat:generate && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production DOCS_LANG=en astro build --outDir=../../dist/angular",
"build-staging:jp": "npm run xplat:generate:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build-staging:kr": "npm run generate:kr && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 DOCS_ENV=staging NODE_ENV=production DOCS_LANG=kr astro build --outDir=../../dist/angular-kr",
"build-production": "npm run sync:generated-from-xplat && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production astro build --outDir=../../dist/angular",
"build-production:en": "npm run sync:generated-from-xplat && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production DOCS_LANG=en astro build --outDir=../../dist/angular",
"build-production:jp": "npm run sync:generated-from-xplat:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build-production": "npm run xplat:generate && npm run generate && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production astro build --outDir=../../dist/angular",
"build-production:en": "npm run xplat:generate && npm run generate:en && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production DOCS_LANG=en astro build --outDir=../../dist/angular",
"build-production:jp": "npm run xplat:generate:jp && npm run generate:jp && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production DOCS_LANG=jp astro build --outDir=../../dist/angular-jp",
"build-production:kr": "npm run generate:kr && cross-env PLATFORM=Angular NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production DOCS_LANG=kr astro build --outDir=../../dist/angular-kr",
"preview": "cross-env PLATFORM=Angular astro preview --outDir=../../dist/angular",
"preview:en": "cross-env PLATFORM=Angular DOCS_LANG=en astro preview --outDir=../../dist/angular --port 4321",
Expand Down
Loading
Loading