Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
53fc411
chore(prettier): keep each paragraph on one line (#4859)
thetaPC Nov 19, 2026
4e038a4
chore(ci): read the Node version from .nvmrc (#4860)
thetaPC Nov 19, 2026
210f68d
docs: link to other docs by relative file path (#4862)
thetaPC Nov 19, 2026
30d679d
docs(v8): point overview cards at the v8 pages (#4879)
thetaPC Nov 19, 2026
a2d1e63
chore(lint): flag doc links that aren't relative file paths (#4863)
thetaPC Nov 19, 2026
450f539
chore(renovate): automerge minor and patch updates and lockfile maint…
thetaPC Nov 19, 2026
95f9eca
docs: require a frontmatter description on every page (#4865)
thetaPC Nov 19, 2026
9ed20c5
docs(config): show each example in its own section and version (#4866)
thetaPC Nov 20, 2026
2adee8c
chore(config): fix v8 edit links and social meta tags, remove unused …
thetaPC Nov 20, 2026
f8cf9fb
fix(prism): highlight scss, vue directives and vue typescript (#4873)
thetaPC Nov 20, 2026
250e72e
chore(navbar): link to final destinations and rename Twitter to X (#4…
thetaPC Nov 20, 2026
621d693
chore(deps): update dependency eslint-plugin-jsdoc to v65.4.10 (#4884)
renovate[bot] Nov 20, 2026
b4381fb
chore(deps): update dependency sass to v1.108.2 (#4887)
renovate[bot] Nov 20, 2026
fd84d29
chore(deps): update dependency eslint-plugin-mdx to v3.10.1 (#4885)
renovate[bot] Nov 20, 2026
e56f821
docs: link to docs by relative file path instead of full URLs (#4882)
thetaPC Nov 20, 2026
cd8f832
chore(deps): update dependency prettier to v3.10.1 (#4886)
renovate[bot] Nov 21, 2026
b061116
style: use ionic-ds tokens for colors that match them exactly (#4883)
thetaPC Nov 23, 2026
46b8859
docs: fix the vue back button binding and the src/css path in contrib…
thetaPC Nov 23, 2026
7005ae9
docs(playground): use className in react snippets (#4890)
thetaPC Nov 23, 2026
d843a8b
chore(deps): update dependency ionicons to v8.1.1 (#4896)
renovate[bot] Nov 24, 2026
b28643b
chore(deps): update dependency cspell to v10.5.2 (#4895)
renovate[bot] Nov 24, 2026
7fc308c
chore(deps): update ionic (#4898)
renovate[bot] Nov 24, 2026
ae025a6
chore(deps): update dependency vue to v3.5.46 (#4897)
renovate[bot] Nov 24, 2026
d0841ae
chore(deps): update ionic to v9.0.14 (#4906)
renovate[bot] Nov 30, 2026
f621493
chore(deps): update dependency @types/react to v19.3.3 (#4913)
renovate[bot] Nov 30, 2026
97d3293
chore(deps): update dependency @types/node to v26.6.11 (#4912)
renovate[bot] Nov 30, 2026
c456b4b
chore(deps): update vite-react (#4911)
renovate[bot] Nov 30, 2026
0abc3f0
chore(deps): update typescript-eslint monorepo to v8.74.0 (#4910)
renovate[bot] Nov 30, 2026
a15e1f3
chore(deps): update dependency vitest to v5.1.1 (#4908)
renovate[bot] Nov 30, 2026
59ef19a
chore(deps): update dependency eslint-plugin-jsdoc to v65.5.3 (#4907)
renovate[bot] Nov 30, 2026
54502b0
chore(deps): update dependency vue-router to v5.5.1 (#4909)
renovate[bot] Nov 30, 2026
8a29d5c
chore(i18n): sync main into translation/jp
thetaPC Dec 1, 2026
433b82d
fix(docs): align kept Japanese pages with main's lint rules
thetaPC Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 2 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: 24

jobs:
# Needs no dependencies, so it reports in seconds rather than queueing behind
# npm ci and lint.
Expand All @@ -38,7 +35,7 @@ jobs:
- name: ⚙️ Use Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: .nvmrc
cache: npm
- name: 🕸️ Install Dependencies
run: npm ci
Expand Down Expand Up @@ -91,7 +88,7 @@ jobs:
- name: ⚙️ Use Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ env.NODE_VERSION }}
node-version-file: .nvmrc
cache: npm
- name: 🕸️ Install Dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@ module.exports = {
...ionicConfig,
// Override the trailingComma setting to avoid trailing commas in function arguments and JSX props.
trailingComma: 'es5',
overrides: [
...ionicConfig.overrides,
{
files: ['*.md', '*.mdx'],
// GitHub alerts such as `> [!NOTE]` need the marker on its own line.
excludeFiles: ['CONTRIBUTING.md'],
options: { proseWrap: 'never' },
},
],
};
147 changes: 147 additions & 0 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/**
* Remark plugins that `npm run lint` runs on docs pages through the
* `mdx/remark` rule in `eslint.config.mjs`.
*/

import path from 'node:path';

import remarkFrontmatter from 'remark-frontmatter';

// Schemes such as https: and mailto:, in-page anchors, and protocol-relative URLs.
const NOT_A_PAGE_LINK = /^([a-z][a-z\d+.-]*:|#|\/\/)/i;

// A page on this site by its full URL. A versioned URL such as `/docs/v3/` or
// `/docs/v8/` opens that version rather than the current one, so it is allowed.
const DOCS_SITE_URL = /^https?:\/\/(www\.)?ionicframework\.com\/docs(?!\/v\d+(\/|$|[?#]))(\/|$|[?#])/i;

const pathOf = (url) => url.split(/[?#]/)[0];

/**
* A Markdown link to a doc must be its relative file path with the extension,
* such as `./accordion.mdx`. Docusaurus resolves it to the page in the same
* version and fails the build if the file is missing, and editors can follow
* it. Without the extension it is a URL that Docusaurus cannot map to a file,
* and a leading `/` is read from the repo root by editors and GitHub. A full
* `ionicframework.com/docs` URL always opens the current version, so a reader
* on an older version lands on the wrong page.
*
* A JSX `href` or `to` never goes through that resolver, so it must be an
* absolute URL path without the extension, such as `/api/accordion`. A relative
* one resolves against the page's URL instead, and on an older version's page
* one without the version prefix, such as `/v8/`, leads to the current docs.
*/
const checkMarkdownLink = (url) => {
if (DOCS_SITE_URL.test(url) && !/\.[a-z\d]+$/i.test(pathOf(url).replace(/\/$/, ''))) {
return `Link to \`${url}\` by the doc's relative file path, such as \`../api/modal.mdx\`. A full URL always opens the current version.`;
}
if (url === '' || NOT_A_PAGE_LINK.test(url)) return null;
const path = pathOf(url);
if (/\.mdx?$/.test(path)) {
return path.startsWith('/')
? `Link to \`${url}\` by its relative file path, such as \`./accordion.mdx\`. Editors and GitHub read a leading \`/\` from the repo root.`
: null;
}
// Another extension is a static file, such as an image or a download.
if (/\.[a-z\d]+$/i.test(path)) return null;
return `\`${url}\` is a URL, not a file. Link to the doc's relative file path with its extension, such as \`./accordion.mdx\`, so the build checks the page exists in this version.`;
};

// `version` is the older version a page belongs to, such as `v8`, or undefined
// for the current docs.
const checkJsxLink = (url, version) => {
if (url === '' || NOT_A_PAGE_LINK.test(url)) return null;
const path = pathOf(url);
const example = version ? `/${version}/api/accordion` : '/api/accordion';
if (/\.mdx?$/.test(path)) {
return `A JSX link is a URL, not a file. Drop the extension from \`${url}\`, such as \`${example}\`.`;
}
if (!path.startsWith('/')) {
return `Make \`${url}\` an absolute URL path, such as \`${example}\`. A relative link resolves against the page's URL.`;
}
if (version && !new RegExp(`^/${version}(/|$)`).test(path)) {
return `Start \`${url}\` with \`/${version}/\`, such as \`${example}\`. Without it, the link leads to the current docs.`;
}
return null;
};

// Matches both separators, since the lint also runs on Windows.
const versionOf = (filePath) => filePath.match(/[\\/]versioned_docs[\\/]version-([^\\/]+)[\\/]/)?.[1];

function docLinks() {
return (tree, file) => {
const report = (reason, node) => {
const message = file.message(reason, node);
message.source = 'ionic-docs';
message.ruleId = 'doc-links';
};
const version = versionOf(file.path);
const visit = (node) => {
if (node.type === 'link' || node.type === 'definition') {
const reason = checkMarkdownLink(node.url);
if (reason) report(reason, node);
} else if (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') {
for (const attribute of node.attributes) {
if (!['href', 'to'].includes(attribute.name) || typeof attribute.value !== 'string') continue;
const reason = checkJsxLink(attribute.value, version);
if (reason) report(reason, node);
}
}
node.children?.forEach(visit);
};
visit(tree);
};
}

/**
* Every page needs a `description` in its frontmatter. Docusaurus uses it for
* the meta description, link previews, and llms.txt. Without it, Docusaurus
* builds one from the opening text of the page, which can pick up an import, a
* heading id comment, or the first line of a code sample.
*
* A `<meta name="description">` in `<head>` only sets the meta tag, so it does
* not count. Docusaurus skips files and folders starting with `_`, so those
* partials are not pages and need no description.
*/
function pageDescription() {
return (tree, file) => {
const report = (reason, place) => {
const message = file.message(reason, place);
message.source = 'ionic-docs';
message.ruleId = 'page-description';
};
// Only the path inside the repo counts, so a checkout under a `_` folder,
// such as a self-hosted runner's `_work/`, is still checked.
const repoPath = file.path ? path.relative(file.cwd, file.path) : '';
if (repoPath.split(/[\\/]/).some((segment) => segment.startsWith('_'))) return;

const frontmatter = tree.children[0]?.type === 'yaml' ? tree.children[0].value : '';
// An empty quoted string, such as `description: ''`, is no description.
if (!/^description:[ \t]*(?!(['"])\1[ \t]*$)\S/m.test(frontmatter)) {
report(
'Add a `description` to the frontmatter. Without it, Docusaurus builds one from the opening text of the page.',
{ line: 1, column: 1 }
);
}

for (const node of tree.children) {
// Also matches `<Head>` from `@docusaurus/Head`.
if (node.type !== 'mdxJsxFlowElement' || node.name?.toLowerCase() !== 'head') continue;
for (const child of node.children) {
const isDescription = child.name === 'meta' && child.attributes?.some((a) => a.name === 'name' && a.value === 'description');
if (isDescription) {
report(
'Move this description to the frontmatter `description`. Docusaurus does not read it from `<head>`, so link previews and llms.txt use the opening text of the page instead.',
child
);
}
}
}
};
}

export default {
// remark-frontmatter parses the frontmatter as YAML, as Docusaurus does.
// Without it, the lint reads it as Markdown, and a `<` in a description
// becomes an unclosed JSX tag.
plugins: [remarkFrontmatter, docLinks, pageDescription],
};
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ Ionic's documentation is built using [Docusaurus](https://docusaurus.io/). The c
- `components/` - components used across the site
- `global/` - components used globally
- `page/` - components used on a single page or in a limited scope
- `styles/` - global styles and variables
- `components/` - styles split out into the components they target
- `css/` - global styles, refer to its [README](src/css/README.md)
- `theme/` - overrides for the markup Docusaurus's theme renders
- `theme/` - Docusaurus theme components that have been swizzled
- `static/`
- `code/` - StackBlitz project templates used by the playgrounds
Expand All @@ -200,6 +200,10 @@ The content of the Ionic docs is written as [Markdown](https://commonmark.org/)

`/docs` maps to `docs/index.mdx` through `slug: /` in its frontmatter. Older versions live in `versioned_docs/` and are served under their version, such as `/docs/v8/`.

Every page needs a `description` in its frontmatter. Docusaurus uses it for the meta description, link previews, and llms.txt, and `npm run lint` flags a page without one. Files and folders whose names start with `_` are not pages, so use that prefix for a file that other pages only import, such as `developing/config/_global.mdx`.

The frontmatter `title` names the page everywhere: its heading, the sidebar, cards, and link previews. To show a longer title only in search results and the browser tab, put it in `<head>`, such as `<head><title>ion-button: Style Buttons with Custom CSS Properties</title></head>`. A description in `<head>` has no such use, since Docusaurus only reads it from the frontmatter.

Versions listed in [`versions.json`](versions.json) are actively maintained. If your change also applies to one of them, make the same change in its `versioned_docs/version-<name>/` folder. Versions listed in [`versionsArchived.json`](versionsArchived.json) are frozen deployments that are no longer built, so changes to their folders never reach the site.

Markdown links resolve within their own version, but JSX paths such as `<Link to>` and `useBaseUrl` do not. In an older version, prefix them with the version, such as `<Link to="/v8/api/note">`.
Expand All @@ -218,13 +222,17 @@ Content
:::
```

Keep the blank lines after the opening marker, before the closing `:::`, and after it. `npm run lint` puts each paragraph on one line, so without them it merges the markers into the surrounding text and the admonition renders as plain text.

### Links and Headings

Use Markdown for links and headings whenever possible. When you need JSX, such as inside a component prop or in `src/`, use the Docusaurus components instead of raw HTML:

- [`<Link>`](https://docusaurus.io/docs/docusaurus-core#link) from `@docusaurus/Link` instead of `<a>`. It handles the base URL and locale, and opens external URLs in a new tab with `rel="noopener noreferrer"`.
- [`<Heading>`](https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading) from `@theme/Heading` instead of `<h2>` to `<h6>`.

Link to another doc by its relative file path, with the extension, such as `[Accordion](./accordion.mdx)` or `[Config](../developing/config.mdx)`. Docusaurus resolves it to the page in the same version, the build fails if the file doesn't exist, and editors can follow it to the file. A JSX prop such as `href` skips that step, so use the URL path without `/docs` or an extension instead: `/api/accordion`, or `/v8/api/accordion` on a v8 page. In either form, don't link to a doc by its full `ionicframework.com/docs` URL, which always opens the current version. `npm run lint` flags a link that doesn't follow this, though it only catches a full URL in a Markdown link.

The build only checks links and anchors that go through Markdown or these components. A raw `<a href>` to a page that doesn't exist builds without errors, and a raw heading's `id` can't be used as a link target.

Markup inside code samples is exempt, since it's example code rather than part of the page. CI fails on a raw `<a>` or heading anywhere else. To check before pushing, run:
Expand Down
8 changes: 4 additions & 4 deletions _templates/playground/new/vue.md.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ to: "<%= `static/usage/v${version}/${name}/${path}/vue.md` %>"
</template>

<script setup lang="ts">
import { <%= pascalComponent %> } from '@ionic/vue';
import { <%= pascalComponent %> } from '@ionic/vue';
</script>
<% if (css){ -%>

<style scoped>
<%= component %> {
/* styles go here */
}
<%= component %> {
/* styles go here */
}
</style>
<% } -%>
```
19 changes: 8 additions & 11 deletions docs/angular/add-to-existing.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Add to Existing Angular Project
description: 'Learn how to add Ionic Angular to your existing Angular project. Step-by-step guide for integrating Ionic components and features into an existing Angular application.'
sidebar_label: Add to Existing
---

Expand All @@ -8,13 +9,9 @@ import DocsCards from '@components/global/DocsCards';

<head>
<title>Add Ionic Angular to Existing Project: Integration Guide</title>
<meta
name="description"
content="Learn how to add Ionic Angular to your existing Angular project. Step-by-step guide for integrating Ionic components and features into an existing Angular application."
/>
</head>

This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/angular/quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/angular/overview.mdx).
This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](./quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](./overview.mdx).

:::tip

Expand Down Expand Up @@ -76,7 +73,7 @@ Replace the existing `styles` array in `angular.json` with the following:

:::info

While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/layout/global-stylesheets.mdx).
While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](../layout/global-stylesheets.mdx).

:::

Expand All @@ -96,7 +93,7 @@ export const appConfig: ApplicationConfig = {
};
```

This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/angular/zoneless.mdx) for details.
This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](./zoneless.mdx) for details.

## Using Individual Components {/* #using-individual-components */}

Expand All @@ -123,7 +120,7 @@ import { IonButton, IonDatetime } from '@ionic/angular';
export class App {}
```

Visit the [components](/components.mdx) page for all of the available Ionic components.
Visit the [components](../components.mdx) page for all of the available Ionic components.

## Using Ionic Pages {/* #using-ionic-pages */}

Expand Down Expand Up @@ -172,7 +169,7 @@ Replace the existing `styles` array in `angular.json` with the following:
]
```

These stylesheets set up the overall page structure and provide [CSS utilities](/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/layout/global-stylesheets.mdx).
These stylesheets set up the overall page structure and provide [CSS utilities](../layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](../layout/global-stylesheets.mdx).

#### 2. Set up Theming {/* #2-set-up-theming */}

Expand All @@ -191,7 +188,7 @@ Create a `src/theme/variables.css` file with the following content:
@import '@ionic/angular/css/palettes/dark.system.css';
```

This file enables [dark mode support](/theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables.
This file enables [dark mode support](../theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables.

#### 3. Update the App Component {/* #3-update-the-app-component */}

Expand Down Expand Up @@ -322,7 +319,7 @@ Now that you have Ionic Angular integrated into your project, check out:

<DocsCards>

<DocsCard header="Navigation" href="navigation" icon="/icons/component-navigation-icon.png">
<DocsCard header="Navigation" href="/angular/navigation" icon="/icons/component-navigation-icon.png">
<p>Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.</p>
</DocsCard>

Expand Down
Loading
Loading