Skip to content

Commit 6b690e9

Browse files
authored
Documentation (#6549)
This is in response to #6542 to add a section on setting up navigation for a blog so that the archive and category pages appear in the right place.
1 parent 175df61 commit 6b690e9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Diff for: docs/plugins/blog.md

+29
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,35 @@ installed.
153153
[blog]: blog.md
154154
[built-in plugins]: index.md
155155
156+
### Navigation
157+
158+
If you do not have site navigation configured in your `mkdocs.yml` then there is
159+
nothing more to do. The blog [archive] and [category] pages will automatically
160+
appear underneath the automatically generated navigation.
161+
162+
If you do have a navigation structure defined then you will need to specify
163+
where the blog should appear in this. Create a [navigation section with an index
164+
page] for the blog:
165+
166+
```yaml
167+
theme:
168+
name: material
169+
features:
170+
- navigation.indexes
171+
nav:
172+
- ...
173+
- Blog:
174+
- blog/index.md
175+
```
176+
177+
The [archive] and [category] pages will appear within that section as
178+
subsections beneath pages in the blog section. In this case, they would appear
179+
after `index.md`. The path to the `index.md` file must match
180+
[blog_dir][config.blog_dir]. This means that you can name the blog navigation
181+
entry anything you like: 'Blog' or 'News' or perhaps 'Tips'.
182+
183+
[navigation section with an index page]: ../setup/setting-up-navigation.md#section-index-pages
184+
156185
### General
157186

158187
The following settings are available:

0 commit comments

Comments
 (0)