Skip to content

Commit

Permalink
docs(v2): fix incorrect anchor links in website (#5021)
Browse files Browse the repository at this point in the history
* docs: fix anchor links for docusaurus write-translations

* docs: fix anchor links for docusaurus serve
  • Loading branch information
teikjun authored Jun 20, 2021
1 parent 9fdbd48 commit c96c3b5
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion website/docs/api/plugins/plugin-content-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-docs`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-docs-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-docs/<version>`

### Example file-system structure {#example-file-system-structure}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/plugins/plugin-content-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-pages`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-pages-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-pages`

### Example file-system structure {#example-file-system-structure}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/themes/theme-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-theme-<themeName>`
- **Multi-instance path**: N/A
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `N/A

### Example file-system structure {#example-file-system-structure}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A Docusaurus site is statically rendered, and it can generally work without Java

It is important to test your build locally before deploying to production.

Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve) command for that:
Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve-sitedir) command for that:

```bash npm2yarn
npm run serve
Expand All @@ -51,7 +51,7 @@ Use [slorber/trailing-slash-guide](https://github.com/slorber/trailing-slash-gui

## Self-Hosting {#self-hosting}

Docusaurus can be self-hosted using [`docusaurus serve`](cli.md#docusaurus-serve). Change port using `--port` and `--host` to change host.
Docusaurus can be self-hosted using [`docusaurus serve`](cli.md#docusaurus-serve-sitedir). Change port using `--port` and `--host` to change host.

```bash npm2yarn
npm run serve -- --build --port 80 --host 0.0.0.0
Expand Down
2 changes: 1 addition & 1 deletion website/docs/docusaurus-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function VisitMyWebsiteMessage() {

When [localizing your site](./i18n/i18n-introduction.md), the `<Translate/>` component will allow providing **translation support to React components**, such as your homepage. The `<Translate>` component supports [interpolation](#interpolate).

The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations) CLI and create a `code.json` translation file in `website/i18n/<locale>`.
The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations-sitedir) CLI and create a `code.json` translation file in `website/i18n/<locale>`.

:::note

Expand Down
4 changes: 2 additions & 2 deletions website/docs/i18n/i18n-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function Home() {

### Initialize the `i18n` folder {#initialize-the-i18n-folder}

Use the [write-translations](../cli.md#docusaurus-write-translations) CLI command to initialize the JSON translation files for the French locale:
Use the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command to initialize the JSON translation files for the French locale:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down Expand Up @@ -157,7 +157,7 @@ To keep your translated sites consistent, when the `website/docs/doc1.md` doc is

### JSON translations {#json-translations}

To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations) CLI command:
To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down
2 changes: 1 addition & 1 deletion website/docs/i18n/i18n-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ website/i18n
└── navbar.json
```

The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations) CLI command.
The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations-sitedir) CLI command.

The `code.json` file is extracted from React components using the `<Translate>` API.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-docs`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-docs-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-docs/<version>`

### Example file-system structure {#example-file-system-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-pages`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-pages-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-pages`

### Example file-system structure {#example-file-system-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-theme-<themeName>`
- **Multi-instance path**: N/A
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `N/A

### Example file-system structure {#example-file-system-structure}
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.0-beta.0/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can deploy your site to static site hosting services such as [Vercel](https:

## Testing Build Local {#testing-build-local}

It is important to test build before deploying to a production. Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve) command to test build locally.
It is important to test build before deploying to a production. Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve-sitedir) command to test build locally.

```bash npm2yarn
npm run serve
Expand All @@ -29,7 +29,7 @@ It is not the most performant solution

:::

Docusaurus can be self hosted using [`docusaurus serve`](cli.md#docusaurus-serve). Change port using `--port` and `--host` to change host.
Docusaurus can be self hosted using [`docusaurus serve`](cli.md#docusaurus-serve-sitedir). Change port using `--port` and `--host` to change host.

```bash npm2yarn
npm run serve -- --build --port 80 --host 0.0.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function VisitMyWebsiteMessage() {

When [localizing your site](./i18n/i18n-introduction.md), the `<Translate/>` component will allow providing **translation support to React components**, such as your homepage. The `<Translate>` component supports [interpolation](#interpolate).

The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations) CLI and create a `code.json` translation file in `website/i18n/<locale>`.
The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations-sitedir) CLI and create a `code.json` translation file in `website/i18n/<locale>`.

:::note

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.0-beta.0/i18n/i18n-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function Home() {

### Initialize the `i18n` folder {#initialize-the-i18n-folder}

Use the [write-translations](../cli.md#docusaurus-write-translations) CLI command to initialize the JSON translation files for the French locale:
Use the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command to initialize the JSON translation files for the French locale:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down Expand Up @@ -157,7 +157,7 @@ To keep your translated sites consistent, when the `website/docs/doc1.md` doc is

### JSON translations {#json-translations}

To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations) CLI command:
To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ website/i18n
└── navbar.json
```

The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations) CLI command.
The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations-sitedir) CLI command.

The `code.json` file is extracted from React components using the `<Translate>` API.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-docs`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-docs-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-docs/<version>`

### Example file-system structure {#example-file-system-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-pages`
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-pages-<pluginId>`
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-pages`

### Example file-system structure {#example-file-system-structure}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Read the [i18n introduction](../../i18n/i18n-introduction.md) first.

- **Base path**: `website/i18n/<locale>/docusaurus-theme-<themeName>`
- **Multi-instance path**: N/A
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations)
- **JSON files**: extracted with [`docusaurus write-translations`](../../cli.md#docusaurus-write-translations-sitedir)
- **Markdown files**: `N/A

### Example file-system structure {#example-file-system-structure}
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.0-beta.1/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A Docusaurus site is statically rendered, and it can generally work without Java

It is important to test your build locally before deploying to production.

Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve) command for that:
Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve-sitedir) command for that:

```bash npm2yarn
npm run serve
Expand All @@ -51,7 +51,7 @@ Use [slorber/trailing-slash-guide](https://github.com/slorber/trailing-slash-gui

## Self-Hosting {#self-hosting}

Docusaurus can be self-hosted using [`docusaurus serve`](cli.md#docusaurus-serve). Change port using `--port` and `--host` to change host.
Docusaurus can be self-hosted using [`docusaurus serve`](cli.md#docusaurus-serve-sitedir). Change port using `--port` and `--host` to change host.

```bash npm2yarn
npm run serve -- --build --port 80 --host 0.0.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function VisitMyWebsiteMessage() {

When [localizing your site](./i18n/i18n-introduction.md), the `<Translate/>` component will allow providing **translation support to React components**, such as your homepage. The `<Translate>` component supports [interpolation](#interpolate).

The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations) CLI and create a `code.json` translation file in `website/i18n/<locale>`.
The translation strings will be extracted from your code with the [`docusaurus write-translations`](./cli.md#docusaurus-write-translations-sitedir) CLI and create a `code.json` translation file in `website/i18n/<locale>`.

:::note

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.0-beta.1/i18n/i18n-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function Home() {

### Initialize the `i18n` folder {#initialize-the-i18n-folder}

Use the [write-translations](../cli.md#docusaurus-write-translations) CLI command to initialize the JSON translation files for the French locale:
Use the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command to initialize the JSON translation files for the French locale:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down Expand Up @@ -157,7 +157,7 @@ To keep your translated sites consistent, when the `website/docs/doc1.md` doc is

### JSON translations {#json-translations}

To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations) CLI command:
To help you maintain the JSON translation files, it is possible to run again the [write-translations](../cli.md#docusaurus-write-translations-sitedir) CLI command:

```bash npm2yarn
npm run write-translations -- --locale fr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ website/i18n
└── navbar.json
```

The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations) CLI command.
The JSON files are initialized with the [`docusaurus write-translations`](../cli.md#docusaurus-write-translations-sitedir) CLI command.

The `code.json` file is extracted from React components using the `<Translate>` API.

Expand Down

0 comments on commit c96c3b5

Please sign in to comment.