Skip to content

Commit

Permalink
docs: change the ID of the new documentation page (#1718)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
italicize authored and yangshun committed Aug 4, 2019
1 parent 8483012 commit 1c115d6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/tutorial-create-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ React is being used as a templating engine for rendering static markup. You can

## 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:

```
---
id: doc4
title: This is Doc 4
id: doc9
title: This is Doc 9
---
I can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
Expand All @@ -72,14 +72,14 @@ I can write content using [GitHub-flavored Markdown syntax](https://github.githu
* 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
{
"docs": {
"Docusaurus": [
"doc1",
+ "doc4"
+ "doc9"
],
"First Category": ["doc2"],
"Second Category": ["doc3"]
Expand All @@ -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`.
1. Navigate to http://localhost:3000/docs/doc4.
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/doc9 to see the new documentation page.

You've created your first documentation page on Docusaurus!

Expand Down

0 comments on commit 1c115d6

Please sign in to comment.