mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
docs(v2): i18n doc + polish (#4014)
* add some initial i18n doc * i18n doc progress * i18n tutorial progress * i18n tutorial progress * polish Crowdin docs * i18n sidebar in guides * polish crowdin doc * update Crowdin doc a bit * fix annoying relative link to global site resource in template (breaks i18n tutorial) * template: use simpler export for homepage * add markdown page example * rename mdx.md to interactiveDoc.mdx * update bootstrap/facebook templates too * sync init template package scripts * add slug frontmatter doc * improve i18n doc * complete i18n doc * temporarily enable the localeDropdown * doc typo * improve the i18n doc * Add Git i18n doc * add missing "--" for npm run options (unfortunately they don't get stripped by npm2yarn, and are required foor npm) * improve a bit the Crowdin doc
This commit is contained in:
parent
af8dc63202
commit
a8ee7fd3e8
50 changed files with 1469 additions and 102 deletions
|
@ -105,3 +105,24 @@ module.exports = {
|
|||
],
|
||||
};
|
||||
```
|
||||
|
||||
## i18n
|
||||
|
||||
Read the [i18n introduction](../../i18n/i18n-introduction.md) first.
|
||||
|
||||
### Translation files location
|
||||
|
||||
- **Base path**: `website/i18n/<locale>/docusaurus-plugin-content-blog`
|
||||
- **Multi-instance path**: `website/i18n/<locale>/docusaurus-plugin-content-blog-<pluginId>`
|
||||
- **JSON files**: N/A
|
||||
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-blog`
|
||||
|
||||
### Example file-system structure
|
||||
|
||||
```bash
|
||||
website/i18n/<locale>/docusaurus-plugin-content-blog
|
||||
│
|
||||
│ # translations for website/blog
|
||||
├── first-blog-post.md
|
||||
└── second-blog-post.md
|
||||
```
|
||||
|
|
|
@ -147,6 +147,7 @@ Markdown documents can use the following markdown frontmmatter metadata fields,
|
|||
- `keywords`: Keywords meta tag for the document page, for search engines.
|
||||
- `description`: The description of your document, which will become the `<meta name="description" content="..."/>` and `<meta property="og:description" content="..."/>` in `<head>`, used by search engines. If this field is not present, it will default to the first line of the contents.
|
||||
- `image`: Cover or thumbnail image that will be used when displaying the link to your post.
|
||||
- `slug`: Allows to customize the document url
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -163,6 +164,38 @@ keywords:
|
|||
- docs
|
||||
- docusaurus
|
||||
image: https://i.imgur.com/mErPwqL.png
|
||||
slug: /myDoc
|
||||
---
|
||||
My Document Markdown content
|
||||
```
|
||||
|
||||
## i18n
|
||||
|
||||
Read the [i18n introduction](../../i18n/i18n-introduction.md) first.
|
||||
|
||||
### Translation files location
|
||||
|
||||
- **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)
|
||||
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-docs/<version>`
|
||||
|
||||
### Example file-system structure
|
||||
|
||||
```bash
|
||||
website/i18n/<locale>/docusaurus-plugin-content-docs
|
||||
│
|
||||
│ # translations for website/docs
|
||||
├── current
|
||||
│ ├── api
|
||||
│ │ └── config.md
|
||||
│ └── getting-started.md
|
||||
├── current.json
|
||||
│
|
||||
│ # translations for website/versioned_docs/version-1.0.0
|
||||
├── version-1.0.0
|
||||
│ ├── api
|
||||
│ │ └── config.md
|
||||
│ └── getting-started.md
|
||||
└── version-1.0.0.json
|
||||
```
|
||||
|
|
|
@ -66,3 +66,24 @@ module.exports = {
|
|||
],
|
||||
};
|
||||
```
|
||||
|
||||
## i18n
|
||||
|
||||
Read the [i18n introduction](../../i18n/i18n-introduction.md) first.
|
||||
|
||||
### Translation files location
|
||||
|
||||
- **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)
|
||||
- **Markdown files**: `website/i18n/<locale>/docusaurus-plugin-content-pages`
|
||||
|
||||
### Example file-system structure
|
||||
|
||||
```bash
|
||||
website/i18n/<locale>/docusaurus-plugin-content-pages
|
||||
│
|
||||
│ # translations for website/src/pages
|
||||
├── first-markdown-page.md
|
||||
└── second-markdown-page.md
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue