Skip to content

Commit 079c807

Browse files
docs: Update README.md
1 parent 70a99c6 commit 079c807

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

docs/README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,10 @@ Edit your homepage (_docs/README.md_). Complete the `TODO` items, using the sugg
145145

146146
### 4. Configure menu structure
147147

148-
If for some reason you do not want a navigation sidebar on the frontend, then you should delete *_sidebar.md* from your _docs_ directory, set the `loadSidebar` option to `false` in _index.html_ and then skip to the next section - [Configure Cover Page](#5-configure-cover-page)
149-
150-
The sidebar is enabled in _index.html_ of the quickstart. A Docsify site is unaware of project structure, unless you provide it.
151148

152149
#### Auto sidebar
153150

154-
You may choose to display the sidebar, but have it populated automatically from headings on the homepage (_docs/README.md_).
151+
You may choose to display the sidebar, but have it populated automatically from headings on a single HTML file - the homepage (_docs/README.md_). This is the way that this project's own docs site is setup.
155152
156153
This solution is great if you are happy to move all your doc content into a **single** markdown file, as it means not having to worry about manually updating a navigation bar when you docs change. Especially if you have a many files to manage or they are likely to change in name or structure.
157154
@@ -167,29 +164,36 @@ Warning: If you go for this option without a configured sidebar, do not leave an
167164
168165
You can choose to configure a custom sidebar. This is necessary to link to the multiple doc files.
169166
167+
##### Guidelines
168+
170169
Guidelines for setting up a sidebar file:
171170
172171
- The format should be bullet points in markdown format.
173172
- Each menu item should be a markdown link e.g. `[Name](link)`. An item may exist on the menu without a link - this is useful for grouping items together under a menu heading.
174173
- The links must be follow restrictions noted above in [Doc links](#doc-links). If the doc files change (e.g. are renamed or moved), you need to remember to update the sidebar config.
175174
- The bullet points may optionally be nested, using indentation. You may create arbitrary indentation in your sidebar, even if all you files are at the same level in the _docs_ directory.
176175
176+
Example:
177+
178+
```markdown
179+
- [Home](/#my-app)
180+
- [Foo](foo.md)
181+
- [Bar](bar.md)
182+
- Baz
183+
* [Fizz](baz/fizz.md)
184+
* [Foo Bar](baz/foobar.md)
185+
```
177186
178-
To setup a custom sidebar:
187+
##### Setup custom sidebar
179188
180-
1. Edit the *_sidebar.md* file.
181-
2. Add items using guide above. Example below.
182-
```markdown
183-
- [Home](/#my-app)
184-
- [Foo](foo.md)
185-
- [Bar](bar.md)
186-
- Baz
187-
* [Fizz](baz/fizz.md)
188-
* [Foo Bar](baz/foobar.md)
189-
```
189+
1. Ensure `loadSidebar: true` is set in the _index.html_ file.
190+
- The value of `true` means `*_sidebar.md*` will be referenced by the app.
191+
- The sidebar is already enabled in the quicksart [index.html](https://github.com/MichaelCurrin/docsify-template/blob/master/quickstart/index.html).
192+
2. Edit the *_sidebar.md* file.
193+
3. Add items using the guidelines above.
190194
191195
192-
#### Note on homepage link
196+
##### Note on Home link
193197
194198
The clickable text above the standard sidebar takes you to the cover page. You can scroll down to the homepage (_docs/README.md_), but there are no links on the page to the homepage. So add a link to the homepage with the first entry above. Note: An alternative is to use the nav bar config for Home button, rather than sidebar config.
195199

0 commit comments

Comments
 (0)