From 22f3a85a494ddf46bc29964a7989335a7dba4a9a Mon Sep 17 00:00:00 2001 From: Steve Hook Date: Thu, 19 Jul 2018 12:07:32 +0300 Subject: [PATCH] add documentation regarding usage of nested docs + git ignore .idea (#860) * add documentation regarding usage of nested docs + add .idea in .gitignore * Remove 1.3.3, move to navigation & simplify wording * add documentation for docusaurus >= v1.2.0 a well --- .gitignore | 1 + docs/guides-navigation.md | 22 +++++++++++++++++++ .../version-1.2.0/guides-navigation.md | 22 +++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/.gitignore b/.gitignore index d2f884e6b6..f71c2855b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .vscode +.idea *.code-workspace node_modules diff --git a/docs/guides-navigation.md b/docs/guides-navigation.md index 5a7ba736e5..7859abe3f2 100644 --- a/docs/guides-navigation.md +++ b/docs/guides-navigation.md @@ -72,6 +72,28 @@ Or you can create a new category within the sidebar: } ``` +However, for a document located in a docs subdirectory like below: + +```bash +docs +└── dir1 + └── getting-started.md +``` + +You should provide `directory/id` instead of `id` in `sidebars.json`. + +```js +{ + "docs": { + "My New Sidebar Category": [ + "dir1/getting-started" + ], + ... + }, + ... +} +``` + ### Adding New Sidebars You can also put a document in a new sidebar. In the following example, we are creating an `examples-sidebar` sidebar within `sidebars.json` that has a category called `My Example Category` containing a document with an `id` of `my-examples`. diff --git a/website/versioned_docs/version-1.2.0/guides-navigation.md b/website/versioned_docs/version-1.2.0/guides-navigation.md index e7661739e3..952a2e065d 100644 --- a/website/versioned_docs/version-1.2.0/guides-navigation.md +++ b/website/versioned_docs/version-1.2.0/guides-navigation.md @@ -73,6 +73,28 @@ Or you can create a new category within the sidebar: } ``` +However, for a document located in a docs subdirectory like below: + +```bash +docs +└── dir1 + └── getting-started.md +``` + +You should provide `directory/id` instead of `id` in `sidebars.json`. + +```js +{ + "docs": { + "My New Sidebar Category": [ + "dir1/getting-started" + ], + ... + }, + ... +} +``` + ### Adding New Sidebars You can also put a document in a new sidebar. In the following example, we are creating an `examples-sidebar` sidebar within `sidebars.json` that has a category called `My Example Category` containing a document with an `id` of `my-examples`.