You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+20-16Lines changed: 20 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -145,13 +145,10 @@ Edit your homepage (_docs/README.md_). Complete the `TODO` items, using the sugg
145
145
146
146
### 4. Configure menu structure
147
147
148
-
If forsome 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.
151
148
152
149
#### Auto sidebar
153
150
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.
155
152
156
153
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.
157
154
@@ -167,29 +164,36 @@ Warning: If you go for this option without a configured sidebar, do not leave an
167
164
168
165
You can choose to configure a custom sidebar. This is necessary to link to the multiple doc files.
169
166
167
+
##### Guidelines
168
+
170
169
Guidelines for setting up a sidebar file:
171
170
172
171
- The format should be bullet points in markdown format.
173
172
- 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.
174
173
- 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.
175
174
- 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.
176
175
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
+
```
177
186
178
-
To setup a custom sidebar:
187
+
##### Setup custom sidebar
179
188
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.
190
194
191
195
192
-
#### Note on homepage link
196
+
##### Note on Home link
193
197
194
198
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.
0 commit comments