From 1c115d6ba45fc98a18c904f68f39715d826f78b0 Mon Sep 17 00:00:00 2001 From: Jay Martin Date: Sun, 4 Aug 2019 12:42:55 -0700 Subject: [PATCH] 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 --- docs/tutorial-create-pages.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/tutorial-create-pages.md b/docs/tutorial-create-pages.md index 9cc4f3ce57..fad4dc7f08 100644 --- a/docs/tutorial-create-pages.md +++ b/docs/tutorial-create-pages.md @@ -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/). @@ -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"] @@ -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 (Cmd + C or Ctrl + C) 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 (Cmd + C or Ctrl + C), 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!