Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: attempt to fix Crowdin issues #9220

Merged
merged 12 commits into from
Aug 12, 2023
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
2 changes: 0 additions & 2 deletions packages/docusaurus-plugin-client-redirects/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ export default function pluginClientRedirectsPages(
siteConfig: props.siteConfig,
};

console.log({propsBaseUrl: props.baseUrl});

const redirects: RedirectItem[] = collectRedirects(
pluginContext,
trailingSlash,
Expand Down
4 changes: 2 additions & 2 deletions website/docs/advanced/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ If you put some HTML pages under the `static` folder, they will be copied to the

<BrowserWindow>

- [/pure-html](/pure-html)
- [pathname:///pure-html](pathname:///pure-html)
- [`/pure-html`](/pure-html)
- [`pathname:///pure-html`](pathname:///pure-html)

</BrowserWindow>

Expand Down
8 changes: 4 additions & 4 deletions website/docs/api/docusaurus.config.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: API reference for Docusaurus configuration file.
slug: /api/docusaurus-config
---

import APITable from '@site/src/components/APITable';

# `docusaurus.config.js`

import APITable from '@site/src/components/APITable';

:::info

Refer to the Getting Started [**Configuration**](docs/configuration.mdx) for examples.
Refer to the Getting Started [**Configuration**](../configuration.mdx) for examples.

:::

Expand Down Expand Up @@ -42,7 +42,7 @@ module.exports = async function createConfigAsync() {

:::tip

Refer to [**Syntax to declare `docusaurus.config.js`**](docs/configuration.mdx#syntax-to-declare-docusaurus-config) for a more exhaustive list of examples and explanations.
Refer to [**Syntax to declare `docusaurus.config.js`**](../configuration.mdx#syntax-to-declare-docusaurus-config) for a more exhaustive list of examples and explanations.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/plugins/plugin-debug.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

The debug plugin will display useful debug information at [http://localhost:3000/\_\_docusaurus/debug](http://localhost:3000/__docusaurus/debug).
The debug plugin will display useful debug information at [`http://localhost:3000/__docusaurus/debug`](http://localhost:3000/__docusaurus/debug).

It is mostly useful for plugin authors, that will be able to inspect more easily the content of the `.docusaurus` folder (like the creates routes), but also be able to inspect data structures that are never written to disk, like the plugin data loaded through the `contentLoaded` lifecycle.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/api/themes/theme-classic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ sidebar_position: 2
slug: /api/themes/@docusaurus/theme-classic
---

import APITable from '@site/src/components/APITable';

# 📦 theme-classic

import APITable from '@site/src/components/APITable';

The classic theme for Docusaurus.

You can refer to the [theme configuration page](theme-configuration.mdx) for more details on the configuration.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It is important to test your build locally before deploying it for production. D
npm run serve
```

By default, this will load your site at [http://localhost:3000/](http://localhost:3000/).
By default, this will load your site at [`http://localhost:3000/`](http://localhost:3000/).

## Trailing slash configuration {#trailing-slashes}

Expand Down
4 changes: 2 additions & 2 deletions website/docs/guides/creating-pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Hello() {
}
```

Once you save the file, the development server will automatically reload the changes. Now open [http://localhost:3000/helloReact](http://localhost:3000/helloReact) and you will see the new page you just created.
Once you save the file, the development server will automatically reload the changes. Now open [`http://localhost:3000/helloReact`](http://localhost:3000/helloReact) and you will see the new page you just created.

Each page doesn't come with any styling. You will need to import the `Layout` component from `@theme/Layout` and wrap your contents within that component if you want the navbar and/or footer to appear.

Expand All @@ -77,7 +77,7 @@ hide_table_of_contents: true
How are you?
```

In the same way, a page will be created at [http://localhost:3000/helloMarkdown](http://localhost:3000/helloMarkdown).
In the same way, a page will be created at [`http://localhost:3000/helloMarkdown`](http://localhost:3000/helloMarkdown).

Markdown pages are less flexible than React pages because it always uses the theme layout.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/i18n/i18n-crowdin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Start your site on the French locale:
npm run start -- --locale fr
```

Make sure that your website is now translated in French at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Make sure that your website is now translated in French at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

### Automate with CI {#automate-with-ci}

Expand Down
6 changes: 3 additions & 3 deletions website/docs/i18n/i18n-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Start your localized site in dev mode, using the locale of your choice:
npm run start -- --locale fr
```

Your site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Your site is accessible at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

We haven't provided any translation yet, so the site is mostly untranslated.

Expand Down Expand Up @@ -472,8 +472,8 @@ You can now [deploy](../deployment.mdx) the `build` folder to the static hosting

The Docusaurus v2 website uses this strategy:

- [https://docusaurus.io](https://docusaurus.io)
- [https://docusaurus.io/fr](https://docusaurus.io/fr)
- [`https://docusaurus.io`](https://docusaurus.io)
- [`https://docusaurus.io/fr`](https://docusaurus.io/fr)

:::

Expand Down
2 changes: 1 addition & 1 deletion website/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ cd my-website
npm run start
```

By default, a browser window will open at [http://localhost:3000](http://localhost:3000).
By default, a browser window will open at [`http://localhost:3000`](http://localhost:3000).

Congratulations! You have just created your first Docusaurus site! Browse around the site to see what's available.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cd my-website
npx docusaurus start
```

Open [http://localhost:3000](http://localhost:3000) and follow the tutorial.
Open [`http://localhost:3000`](http://localhost:3000) and follow the tutorial.

:::tip

Expand Down
4 changes: 2 additions & 2 deletions website/docs/migration/migration-manual.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ In v1, all pages were available with or without the `.html` extension.

For example, these 2 pages exist:

- [https://v1.docusaurus.io/docs/en/installation](https://v1.docusaurus.io/docs/en/installation)
- [https://v1.docusaurus.io/docs/en/installation.html](https://v1.docusaurus.io/docs/en/installation.html)
- [`https://v1.docusaurus.io/docs/en/installation`](https://v1.docusaurus.io/docs/en/installation)
- [`https://v1.docusaurus.io/docs/en/installation.html`](https://v1.docusaurus.io/docs/en/installation.html)

If [`cleanUrl`](https://v1.docusaurus.io/docs/en/site-config#cleanurl-boolean) was:

Expand Down
10 changes: 8 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,21 @@ module.exports = async function createConfigAsync() {
// comments: false,
},
preprocessor: ({filePath, fileContent}) => {
let result = fileContent;

result = result.replaceAll('{/_', '{/*');
result = result.replaceAll('_/}', '*/}');

if (isDev) {
// "vscode://file/${projectPath}${filePath}:${line}:${column}",
// "webstorm://open?file=${projectPath}${filePath}&line=${line}&column=${column}",
const vscodeLink = `vscode://file/${filePath}`;
const webstormLink = `webstorm://open?file=${filePath}`;
const intellijLink = `idea://open?file=${filePath}`;
return `${fileContent}\n\n---\n\n**DEV**: open this file in [VSCode](<${vscodeLink}>) | [WebStorm](<${webstormLink}>) | [IntelliJ](<${intellijLink}>)\n`;
result = `${result}\n\n---\n\n**DEV**: open this file in [VSCode](<${vscodeLink}>) | [WebStorm](<${webstormLink}>) | [IntelliJ](<${intellijLink}>)\n`;
}
return fileContent;

return result;
},
},
onBrokenLinks: 'throw',
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.1/advanced/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ If you put some HTML pages under the `static` folder, they will be copied to the

<BrowserWindow>

- [/pure-html](/pure-html)
- [pathname:///pure-html](pathname:///pure-html)
- [`/pure-html`](/pure-html)
- [`pathname:///pure-html`](pathname:///pure-html)

</BrowserWindow>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

The debug plugin will display useful debug information at [http://localhost:3000/\_\_docusaurus/debug](http://localhost:3000/__docusaurus/debug).
The debug plugin will display useful debug information at [`http://localhost:3000/__docusaurus/debug`](http://localhost:3000/__docusaurus/debug).

It is mostly useful for plugin authors, that will be able to inspect more easily the content of the `.docusaurus` folder (like the creates routes), but also be able to inspect data structures that are never written to disk, like the plugin data loaded through the `contentLoaded` lifecycle.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ sidebar_position: 2
slug: /api/themes/@docusaurus/theme-classic
---

import APITable from '@site/src/components/APITable';

# 📦 theme-classic

import APITable from '@site/src/components/APITable';

The classic theme for Docusaurus.

You can refer to the [theme configuration page](theme-configuration.mdx) for more details on the configuration.
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.1/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It is important to test your build locally before deploying it for production. D
npm run serve
```

By default, this will load your site at [http://localhost:3000/](http://localhost:3000/).
By default, this will load your site at [`http://localhost:3000/`](http://localhost:3000/).

## Trailing slash configuration {#trailing-slashes}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Hello() {
}
```

Once you save the file, the development server will automatically reload the changes. Now open [http://localhost:3000/helloReact](http://localhost:3000/helloReact) and you will see the new page you just created.
Once you save the file, the development server will automatically reload the changes. Now open [`http://localhost:3000/helloReact`](http://localhost:3000/helloReact) and you will see the new page you just created.

Each page doesn't come with any styling. You will need to import the `Layout` component from `@theme/Layout` and wrap your contents within that component if you want the navbar and/or footer to appear.

Expand All @@ -77,7 +77,7 @@ hide_table_of_contents: true
How are you?
```

In the same way, a page will be created at [http://localhost:3000/helloMarkdown](http://localhost:3000/helloMarkdown).
In the same way, a page will be created at [`http://localhost:3000/helloMarkdown`](http://localhost:3000/helloMarkdown).

Markdown pages are less flexible than React pages because it always uses the theme layout.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Start your site on the French locale:
npm run start -- --locale fr
```

Make sure that your website is now translated in French at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Make sure that your website is now translated in French at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

### Automate with CI {#automate-with-ci}

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-2.0.1/i18n/i18n-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Start your localized site in dev mode, using the locale of your choice:
npm run start -- --locale fr
```

Your site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Your site is accessible at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

We haven't provided any translation yet, so the site is mostly untranslated.

Expand Down Expand Up @@ -464,8 +464,8 @@ You can now [deploy](../deployment.mdx) the `build` folder to the static hosting

The Docusaurus v2 website uses this strategy:

- [https://docusaurus.io](https://docusaurus.io)
- [https://docusaurus.io/fr](https://docusaurus.io/fr)
- [`https://docusaurus.io`](https://docusaurus.io)
- [`https://docusaurus.io/fr`](https://docusaurus.io/fr)

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.1/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ cd my-website
npm run start
```

By default, a browser window will open at [http://localhost:3000](http://localhost:3000).
By default, a browser window will open at [`http://localhost:3000`](http://localhost:3000).

Congratulations! You have just created your first Docusaurus site! Browse around the site to see what's available.

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.1/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cd my-website
npx docusaurus start
```

Open [http://localhost:3000](http://localhost:3000) and follow the tutorial.
Open [`http://localhost:3000`](http://localhost:3000) and follow the tutorial.

:::tip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ In v1, all pages were available with or without the `.html` extension.

For example, these 2 pages exist:

- [https://v1.docusaurus.io/docs/en/installation](https://v1.docusaurus.io/docs/en/installation)
- [https://v1.docusaurus.io/docs/en/installation.html](https://v1.docusaurus.io/docs/en/installation.html)
- [`https://v1.docusaurus.io/docs/en/installation`](https://v1.docusaurus.io/docs/en/installation)
- [`https://v1.docusaurus.io/docs/en/installation.html`](https://v1.docusaurus.io/docs/en/installation.html)

If [`cleanUrl`](https://v1.docusaurus.io/docs/en/site-config#cleanurl-boolean) was:

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.1.0/advanced/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ If you put some HTML pages under the `static` folder, they will be copied to the

<BrowserWindow>

- [/pure-html](/pure-html)
- [pathname:///pure-html](pathname:///pure-html)
- [`/pure-html`](/pure-html)
- [`pathname:///pure-html`](pathname:///pure-html)

</BrowserWindow>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```

The debug plugin will display useful debug information at [http://localhost:3000/\_\_docusaurus/debug](http://localhost:3000/__docusaurus/debug).
The debug plugin will display useful debug information at [`http://localhost:3000/__docusaurus/debug`](http://localhost:3000/__docusaurus/debug).

It is mostly useful for plugin authors, that will be able to inspect more easily the content of the `.docusaurus` folder (like the creates routes), but also be able to inspect data structures that are never written to disk, like the plugin data loaded through the `contentLoaded` lifecycle.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ sidebar_position: 2
slug: /api/themes/@docusaurus/theme-classic
---

import APITable from '@site/src/components/APITable';

# 📦 theme-classic

import APITable from '@site/src/components/APITable';

The classic theme for Docusaurus.

You can refer to the [theme configuration page](theme-configuration.mdx) for more details on the configuration.
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.1.0/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It is important to test your build locally before deploying it for production. D
npm run serve
```

By default, this will load your site at [http://localhost:3000/](http://localhost:3000/).
By default, this will load your site at [`http://localhost:3000/`](http://localhost:3000/).

## Trailing slash configuration {#trailing-slashes}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Hello() {
}
```

Once you save the file, the development server will automatically reload the changes. Now open [http://localhost:3000/helloReact](http://localhost:3000/helloReact) and you will see the new page you just created.
Once you save the file, the development server will automatically reload the changes. Now open [`http://localhost:3000/helloReact`](http://localhost:3000/helloReact) and you will see the new page you just created.

Each page doesn't come with any styling. You will need to import the `Layout` component from `@theme/Layout` and wrap your contents within that component if you want the navbar and/or footer to appear.

Expand All @@ -77,7 +77,7 @@ hide_table_of_contents: true
How are you?
```

In the same way, a page will be created at [http://localhost:3000/helloMarkdown](http://localhost:3000/helloMarkdown).
In the same way, a page will be created at [`http://localhost:3000/helloMarkdown`](http://localhost:3000/helloMarkdown).

Markdown pages are less flexible than React pages because it always uses the theme layout.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Start your site on the French locale:
npm run start -- --locale fr
```

Make sure that your website is now translated in French at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Make sure that your website is now translated in French at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

### Automate with CI {#automate-with-ci}

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-2.1.0/i18n/i18n-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Start your localized site in dev mode, using the locale of your choice:
npm run start -- --locale fr
```

Your site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/).
Your site is accessible at [`http://localhost:3000/fr/`](http://localhost:3000/fr/).

We haven't provided any translation yet, so the site is mostly untranslated.

Expand Down Expand Up @@ -464,8 +464,8 @@ You can now [deploy](../deployment.mdx) the `build` folder to the static hosting

The Docusaurus v2 website uses this strategy:

- [https://docusaurus.io](https://docusaurus.io)
- [https://docusaurus.io/fr](https://docusaurus.io/fr)
- [`https://docusaurus.io`](https://docusaurus.io)
- [`https://docusaurus.io/fr`](https://docusaurus.io/fr)

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.1.0/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ cd my-website
npm run start
```

By default, a browser window will open at [http://localhost:3000](http://localhost:3000).
By default, a browser window will open at [`http://localhost:3000`](http://localhost:3000).

Congratulations! You have just created your first Docusaurus site! Browse around the site to see what's available.

Expand Down
Loading
Loading