mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 05:07:14 +02:00
docs: change the ID of the new documentation page (#1718)
* docs: add the repository to the localhost:3000 link Fix two links on **[Create Pages](https://docusaurus.io/docs/en/next/tutorial-create-pages)**. * docs: use the same start command on both pages The start command in **[Scaffold the Site](https://docusaurus.io/docs/en/next/tutorial-create-new-site)** is "Run `npm start` or `yarn start.`" It will help new users to see the same start command again. A slightly different command will make new users think that something slightly different is happening. * docs: change the ID of the new documentation page The page ID "doc4" is already used by one of the downloaded pages, docs/exampledoc4.md, shown below: ``` --- id: doc4 title: Other Document --- this is another document ``` * docs: removed docusaurus-tutorial/ from the links
This commit is contained in:
parent
8483012f36
commit
1c115d6ba4
1 changed files with 7 additions and 7 deletions
|
@ -49,13 +49,13 @@ React is being used as a templating engine for rendering static markup. You can
|
||||||
|
|
||||||
## Create a Documentation Page
|
## Create a Documentation Page
|
||||||
|
|
||||||
1. Create a new file in the `docs` folder called `doc4.md`. The `docs` folder is in the root of your Docusaurus project, one level above `website`.
|
1. Create a new file in the `docs` folder called `doc9.md`. The `docs` folder is in the root of your Docusaurus project, one level above `website`.
|
||||||
1. Paste the following contents:
|
1. Paste the following contents:
|
||||||
|
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
id: doc4
|
id: doc9
|
||||||
title: This is Doc 4
|
title: This is Doc 9
|
||||||
---
|
---
|
||||||
|
|
||||||
I can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
|
I can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
|
||||||
|
@ -72,14 +72,14 @@ I can write content using [GitHub-flavored Markdown syntax](https://github.githu
|
||||||
* Let's Go
|
* Let's Go
|
||||||
```
|
```
|
||||||
|
|
||||||
3. The `sidebars.json` is where you specify the order of your documentation pages, so open `website/sidebars.json` and add `"doc4"` after `"doc1"`. This ID should be the same one as in the metadata for the Markdown file above, so if you gave a different ID in Step 2, just make sure to use the same ID in the sidebar file.
|
3. The `sidebars.json` is where you specify the order of your documentation pages, so open `website/sidebars.json` and add `"doc9"` after `"doc1"`. This ID should be the same one as in the metadata for the Markdown file above, so if you gave a different ID in Step 2, just make sure to use the same ID in the sidebar file.
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
{
|
{
|
||||||
"docs": {
|
"docs": {
|
||||||
"Docusaurus": [
|
"Docusaurus": [
|
||||||
"doc1",
|
"doc1",
|
||||||
+ "doc4"
|
+ "doc9"
|
||||||
],
|
],
|
||||||
"First Category": ["doc2"],
|
"First Category": ["doc2"],
|
||||||
"Second Category": ["doc3"]
|
"Second Category": ["doc3"]
|
||||||
|
@ -90,8 +90,8 @@ I can write content using [GitHub-flavored Markdown syntax](https://github.githu
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
4. A server restart is needed to pick up sidebar changes, so kill your dev server (<kbd>Cmd</kbd> + <kbd>C</kbd> or <kbd>Ctrl</kbd> + <kbd>C</kbd>) and restart it with `npm run start`.
|
4. A server restart is needed to pick up sidebar changes, so go to your terminal, kill your dev server (<kbd>Cmd</kbd> + <kbd>C</kbd> or <kbd>Ctrl</kbd> + <kbd>C</kbd>), and run `npm start` or `yarn start`.
|
||||||
1. Navigate to http://localhost:3000/docs/doc4.
|
1. Navigate to http://localhost:3000/docs/doc9 to see the new documentation page.
|
||||||
|
|
||||||
You've created your first documentation page on Docusaurus!
|
You've created your first documentation page on Docusaurus!
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue