Skip to content

Commit

Permalink
docs: make config tabs translatable, fix APITable crowdin issue (#7572)
Browse files Browse the repository at this point in the history
* docs: make config tabs translatable, fix APITable crowdin issue

* fix
  • Loading branch information
Josh-Cena authored Jun 6, 2022
1 parent f8163ff commit bf9b69c
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 156 deletions.
4 changes: 4 additions & 0 deletions website/docs/api/misc/eslint-plugin/no-untranslated-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ Examples of **correct** code for this rule:

Accepted fields:

```mdx-code-block
<APITable>
```

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `ignoredStrings` | `string[]` | `[]` | Text labels that only contain strings in this list will not be reported. |

```mdx-code-block
</APITable>
```

## When Not To Use It {#when-not-to-use}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-client-redirects.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ npm install --save @docusaurus/plugin-client-redirects

Accepted fields:

```mdx-code-block
<APITable>
```

| Option | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -44,7 +46,9 @@ Accepted fields:
| `redirects` | <code><a href="#RedirectRule">RedirectRule</a>[]</code> | `[]` | The list of redirect rules. |
| `createRedirects` | <code><a href="#CreateRedirectsFn">CreateRedirectsFn</a></code> | `undefined` | A callback to create a redirect rule. |

```mdx-code-block
</APITable>
```

### Types {#types}

Expand Down
8 changes: 8 additions & 0 deletions website/docs/api/plugins/plugin-content-blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ You can configure this plugin through the [preset options](#ex-config-preset).

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -71,7 +73,9 @@ Accepted fields:
| `feedOptions.language` | `string` (See [documentation](http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes) for possible values) | `undefined` | Language metadata of the feed. |
| `sortPosts` | <code>'descending' \| 'ascending' </code> | `'descending'` | Governs the direction of blog post sorting. |

```mdx-code-block
</APITable>
```

### Types {#types}

Expand Down Expand Up @@ -174,7 +178,9 @@ Markdown documents can use the following Markdown front matter metadata fields,

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -195,7 +201,9 @@ Accepted fields:
| `image` | `string` | `undefined` | Cover or thumbnail image that will be used when displaying the link to your post. |
| `slug` | `string` | File path | Allows to customize the blog post url (`/<routeBasePath>/<slug>`). Support multiple patterns: `slug: my-blog-post`, `slug: /my/path/to/blog/post`, slug: `/`. |

```mdx-code-block
</APITable>
```

```ts
type Tag = string | {label: string; permalink: string};
Expand Down
8 changes: 8 additions & 0 deletions website/docs/api/plugins/plugin-content-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ You can configure this plugin through the preset options.

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -62,7 +64,9 @@ Accepted fields:
| `onlyIncludeVersions` | `string[]` | All versions available | Only include a subset of all available versions. |
| `versions` | <a href="#VersionsConfig"><code>VersionsConfig</code></a> | `{}` | Independent customization of each version's properties. |

```mdx-code-block
</APITable>
```

### Types {#types}

Expand Down Expand Up @@ -257,7 +261,9 @@ Markdown documents can use the following Markdown front matter metadata fields,

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -283,7 +289,9 @@ Accepted fields:
| `draft` | `boolean` | `false` | A boolean flag to indicate that a document is a work-in-progress. Draft documents will only be displayed during development. |
| `last_update` | `FileChange` | `undefined` | Allows overriding the last updated author and/or date. Date can be any [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). |

```mdx-code-block
</APITable>
```

```ts
type Tag = string | {label: string; permalink: string};
Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-content-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ You can configure this plugin through the preset options.

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -41,7 +43,9 @@ Accepted fields:
| `beforeDefaultRemarkPlugins` | `any[]` | `[]` | Custom Remark plugins passed to MDX before the default Docusaurus Remark plugins. |
| `beforeDefaultRehypePlugins` | `any[]` | `[]` | Custom Rehype plugins passed to MDX before the default Docusaurus Rehype plugins. |

```mdx-code-block
</APITable>
```

### Example configuration {#ex-config}

Expand Down
6 changes: 3 additions & 3 deletions website/docs/api/plugins/plugin-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Most Docusaurus users configure this plugin through the preset options.
:::

```mdx-code-block
<Tabs>
<TabItem value="Preset Options">
<Tabs groupId="api-config-ex">
<TabItem value="preset" label="Preset options">
```

If you use a preset, configure this plugin through the [preset options](../../using-plugins.md#docusauruspreset-classic):
Expand All @@ -90,7 +90,7 @@ module.exports = {

```mdx-code-block
</TabItem>
<TabItem value="Plugin Options">
<TabItem value="plugin" label="Plugin Options">
```

If you are using a standalone plugin, provide options directly to the plugin:
Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-google-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ You can configure this plugin through the preset options.

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `trackingID` | `string` | **Required** | The tracking ID of your analytics service. |
| `anonymizeIP` | `boolean` | `false` | Whether the IP should be anonymized when sending requests. |

```mdx-code-block
</APITable>
```

### Example configuration {#ex-config}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-google-gtag.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@ You can configure this plugin through the preset options.

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `trackingID` | `string` | **Required** | The tracking ID of your gtag service. |
| `anonymizeIP` | `boolean` | `false` | Whether the IP should be anonymized when sending requests. |

```mdx-code-block
</APITable>
```

### Example configuration {#ex-config}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-ideal-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ import thumbnail from './path/to/img.png';

Accepted fields:

```mdx-code-block
<APITable>
```

| Option | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -53,7 +55,9 @@ Accepted fields:
| `quality` | `number` | `85` | JPEG compression quality |
| `disableInDev` | `boolean` | `true` | You can test ideal image behavior in dev mode by setting this to `false`. **Tip**: use [network throttling](https://www.browserstack.com/guide/how-to-perform-network-throttling-in-chrome) in your browser to simulate slow networks. |

```mdx-code-block
</APITable>
```

### Example configuration {#ex-config}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/api/plugins/plugin-sitemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ You can configure this plugin through the [preset options](#ex-config-preset).

Accepted fields:

```mdx-code-block
<APITable>
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
Expand All @@ -42,7 +44,9 @@ Accepted fields:
| `ignorePatterns` | `string[]` | `[]` | A list of glob patterns; matching route paths will be filtered from the sitemap. Note that you may need to include the base URL in here. |
| `filename` | `string` | `sitemap.xml` | The path to the created sitemap file, relative to the output directory. Useful if you have two plugin instances outputting two files. |

```mdx-code-block
</APITable>
```

:::info

Expand Down
Loading

0 comments on commit bf9b69c

Please sign in to comment.