Skip to content
Merged
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
16 changes: 11 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,13 @@ The archived URL has to point at a build that _included_ `<archiving>`, so you b
Everything from here on refers to `<archiving>`:

2. **Build `<archiving>`.** Make sure it is in `versions.json`. If you are refreshing an already-archived version, move it out of `versionsArchived.json` and back into `versions.json`, and add it back to the generation scripts in step 10. Commit, push and let Vercel deploy.
3. **Promote the deployment.** In the Vercel dashboard, open that deployment and **Promote to Production** so it does not get cleaned up. Wait for the build to finish before pushing again, or it may get canceled.
4. **Copy its URL.** Use the deployment's unique `ionic-docs-<hash>-ionic1.vercel.app` URL, not the branch or production alias.
3. **Alias the deployment.** Vercel's retention policy deletes old deployments, and promoting one to production does not protect it, since the next `main` deploy takes the production alias away. A preview deployment with its own alias is kept. Wait for the build to finish before pushing again, or it may get canceled. Then copy the deployment's unique `ionic-docs-<hash>-ionic1.vercel.app` URL from the Vercel dashboard and run:

```shell
npx vercel alias set ionic-docs-<hash>-ionic1.vercel.app ionic-docs-<archiving>.vercel.app --scope ionic
```

4. **Use the alias as its URL.** Link to `https://ionic-docs-<archiving>.vercel.app`, never the deployment URL, so a rebuild only has to move the alias.
5. **Archive it.** Remove `<archiving>` from `versions.json`, then add it to `versionsArchived.json` with `/docs/<archiving>` appended and no trailing slash (a trailing slash causes a brief 404 flash):

_`versions.json`_
Expand All @@ -398,9 +403,10 @@ Everything from here on refers to `<archiving>`:

```json
{
"<archiving>": "https://ionic-docs-<hash>-ionic1.vercel.app/docs/<archiving>",
"v6": "https://ionic-docs-lq0if04rc-ionic1.vercel.app/docs/v6",
"v5": "https://ionic-docs-5utg8ms4c-ionic1.vercel.app/docs/v5"
"<archiving>": "https://ionic-docs-<archiving>.vercel.app/docs/<archiving>",
"v7": "https://ionic-docs-v7.vercel.app/docs/v7",
"v6": "https://ionic-docs-v6.vercel.app/docs/v6",
"v5": "https://ionic-docs-v5.vercel.app/docs/v5"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/api/input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import HelperError from '@site/static/usage/v9/input/helper-error/index.mdx';

The input counter is text that displays under an input to notify the user of how many characters have been entered out of the total that the input will accept. When adding counter, the default behavior is to format the value that gets displayed as `inputLength` / `maxLength`. This behavior can be customized by passing in a formatter function to the `counterFormatter` property.

The `counter` and `counterFormatter` properties on `ion-item` were [deprecated in Ionic 7](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#using-the-modern-syntax) and should be used directly on `ion-input` instead.
The `counter` and `counterFormatter` properties on `ion-item` were [deprecated in Ionic 7](https://ionic-docs-v7.vercel.app/docs/v7/api/input#using-the-modern-syntax) and should be used directly on `ion-input` instead.

import Counter from '@site/static/usage/v9/input/counter/index.mdx';

Expand Down
4 changes: 2 additions & 2 deletions docs/developing/android.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import DocsCards from '@components/global/DocsCards';

:::info[Looking for the legacy Android guide?]

The Developing for Android guide has officially migrated to the [Capacitor documentation for Android](https://capacitorjs.com/docs/android). If you need to access the legacy documentation, you can find it under the [legacy developing for Android guide](https://ionic-docs-fo03f34h5-ionic1.vercel.app/docs/v6/developing/android).
The Developing for Android guide has officially migrated to the [Capacitor documentation for Android](https://capacitorjs.com/docs/android). If you need to access the legacy documentation, you can find it under the [legacy developing for Android guide](https://ionic-docs-v6.vercel.app/docs/v6/developing/android).

:::

Expand All @@ -27,7 +27,7 @@ The Developing for Android guide has officially migrated to the [Capacitor docum
</DocsCard>
<DocsCard
header="Developing for Android with Cordova (Legacy)"
href="https://ionic-docs-fo03f34h5-ionic1.vercel.app/docs/v6/developing/android"
href="https://ionic-docs-v6.vercel.app/docs/v6/developing/android"
icon="/icons/native-cordova-bot.png"
>
<p>Learn the fundamentals you need to know to start building Android apps with Ionic Framework and Cordova.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/developing/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import DocsCards from '@components/global/DocsCards';

:::info[Looking for the legacy iOS guide?]

The Developing for iOS guide has officially migrated to the [Capacitor documentation for iOS](https://capacitorjs.com/docs/ios). If you need to access the legacy documentation, you can find it under the [legacy developing for iOS guide](https://ionic-docs-fo03f34h5-ionic1.vercel.app/docs/v6/developing/ios).
The Developing for iOS guide has officially migrated to the [Capacitor documentation for iOS](https://capacitorjs.com/docs/ios). If you need to access the legacy documentation, you can find it under the [legacy developing for iOS guide](https://ionic-docs-v6.vercel.app/docs/v6/developing/ios).

:::

Expand All @@ -28,7 +28,7 @@ The Developing for iOS guide has officially migrated to the [Capacitor documenta
</DocsCard>
<DocsCard
header="Developing for iOS with Cordova (Legacy)"
href="https://ionic-docs-fo03f34h5-ionic1.vercel.app/docs/v6/developing/ios"
href="https://ionic-docs-v6.vercel.app/docs/v6/developing/ios"
icon="/icons/native-cordova-bot.png"
>
<p>Learn the fundamentals you need to know to start building iOS apps with Ionic Framework and Cordova.</p>
Expand Down
12 changes: 6 additions & 6 deletions docs/updating/8-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ iOS >=15

### Checkbox {/* #checkbox */}

1. Migrate any remaining instances of Checkbox to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
1. Migrate any remaining instances of Checkbox to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

### Input {/* #input */}

1. Remove any usages of the `size` property. CSS should be used to specify the visible width of the input instead.
2. Remove any usages of the `accept` property.
3. Migrate any remaining instances of Input to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
3. Migrate any remaining instances of Input to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

### Item {/* #item */}

Expand All @@ -248,19 +248,19 @@ iOS >=15

### Radio {/* #radio */}

1. Migrate any remaining instances of Radio to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
1. Migrate any remaining instances of Radio to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

### Select {/* #select */}

1. Migrate any remaining instances of Select to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
1. Migrate any remaining instances of Select to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

### Textarea {/* #textarea */}

1. Migrate any remaining instances of Textarea to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
1. Migrate any remaining instances of Textarea to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

### Toggle {/* #toggle */}

1. Migrate any remaining instances of Toggle to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
1. Migrate any remaining instances of Toggle to use the [modern form control syntax](https://ionic-docs-v7.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.

## Need Help Upgrading? {/* #need-help-upgrading */}

Expand Down
15 changes: 10 additions & 5 deletions plugins/docusaurus-plugin-ionic-component-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,21 @@ module.exports = function (context, options) {
* @param {*} isCurrentVersion Whether or not this is the current version of the docs
*/
const generateMarkdownForVersion = async (version, npmTag, lang, isCurrentVersion) => {
let COMPONENT_LINK_REGEXP;
const response =
isCurrentVersion && lang === 'ja'
? await fetch(`https://raw.githubusercontent.com/ionic-jp/ionic-docs/main/scripts/data/translated-api.json`)
: await fetch(`https://unpkg.com/@ionic/docs@${npmTag}/core.json`);
const { components } = JSON.parse(dropBaseUrl(await response.text()));
const json = dropBaseUrl(await response.text());

const names = components.map((component) => component.tag.slice(4));
// matches all relative markdown links to a component, e.g. (../button)
COMPONENT_LINK_REGEXP = new RegExp(`\\(../(${names.join('|')})/?(#[^)]+)?\\)`, 'g');
/**
* Some API data links one component to another relatively, for example
* `[Picker API docs](../picker)`. Pages are served without a trailing
* slash, so `../picker` on `api/datetime` resolves outside `api/`.
* Rewriting it to `./picker` keeps it on the component's page.
*/
const names = JSON.parse(json).components.map((component) => component.tag.slice(4));
const componentLink = new RegExp(`\\(\\.\\./(${names.join('|')})/?(#[^)]+)?\\)`, 'g');
const { components } = JSON.parse(json.replace(componentLink, '(./$1$2)'));

components.forEach((comp) => {
const compTag = comp.tag.slice(4);
Expand Down
4 changes: 2 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@
"destination": "/docs/angular/overview"
},
{
"source": "/docs/:version(v6|v7|v8)/angular",
"source": "/docs/:version(v5|v6|v7|v8)/angular",
"destination": "/docs/:version/angular/overview"
},
{
Expand Down Expand Up @@ -1253,7 +1253,7 @@
"destination": "/docs/vue/overview"
},
{
"source": "/docs/:version(v6|v7|v8)/vue",
"source": "/docs/:version(v5|v6|v7|v8)/vue",
"destination": "/docs/:version/vue/overview"
},
{ "source": "/docs/vue/your-first-app/2-taking-photos", "destination": "/docs/vue/your-first-app/taking-photos" },
Expand Down
Loading
Loading