Skip to content

Commit 921a630

Browse files
committed
Documentation
1 parent 6e87dba commit 921a630

File tree

2 files changed

+57
-18
lines changed

2 files changed

+57
-18
lines changed

docs/schema/plugins/blog.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"type": "string",
2828
"default": "blog"
2929
},
30+
"blog_toc": {
31+
"title": "Blog table of contents",
32+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.blog_toc",
33+
"type": "boolean",
34+
"default": false
35+
},
3036
"post_date_format": {
3137
"title": "Format string for post dates",
3238
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.post_date_format",
@@ -203,6 +209,12 @@
203209
}
204210
]
205211
},
212+
"archive_toc": {
213+
"title": "Archive table of contents",
214+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.archive_toc",
215+
"type": "boolean",
216+
"default": false
217+
},
206218
"categories": {
207219
"title": "Categories",
208220
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories",
@@ -241,12 +253,6 @@
241253
"type": "string",
242254
"default": "\"-\""
243255
},
244-
"categories_toc": {
245-
"title": "Category index table of contents",
246-
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_toc",
247-
"type": "boolean",
248-
"default": false
249-
},
250256
"categories_allowed": {
251257
"title": "Categories allowed",
252258
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_allowed",
@@ -257,6 +263,12 @@
257263
"uniqueItems": true,
258264
"default": []
259265
},
266+
"categories_toc": {
267+
"title": "Categories table of contents",
268+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_toc",
269+
"type": "boolean",
270+
"default": false
271+
},
260272
"pagination": {
261273
"title": "Pagination",
262274
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.pagination",

docs/setup/setting-up-a-blog.md

+39-12
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,21 @@ The following configuration options are available:
106106

107107
The path must be defined relative to [`docs_dir`][docs_dir].
108108

109+
[`blog_toc`](#+blog.blog_toc){ #+blog.blog_toc }
110+
111+
: :octicons-milestone-24: Default: `false` – This option specifies whether
112+
indexes include a table of contents with all post titles on the
113+
right side as an overview:
114+
115+
``` yaml
116+
plugins:
117+
- blog:
118+
blog_toc: true
119+
```
120+
121+
Note that this setting is also used as the default value for `archive_toc`
122+
and `categories_toc`, unless those settings are explicitly defined.
123+
109124
__The built-in blog plugin has dozens of options that allow for advanced
110125
configuration. It's a good idea to [start writing your first post], and come
111126
back here later for fine-tuning the output.__
@@ -493,6 +508,18 @@ The following configuration options are available for archive index generation:
493508
archive_url_format: "{date}"
494509
```
495510

511+
[`archive_toc`](#+blog.archive_toc){ #+blog.archive_toc }
512+
513+
: :octicons-milestone-24: Default: `false` – This option specifies whether an
514+
archive index includes a table of contents with all post titles on the
515+
right side as an overview:
516+
517+
``` yaml
518+
plugins:
519+
- blog:
520+
archive_toc: true
521+
```
522+
496523
#### Categories
497524

498525
The following configuration options are available for category index generation:
@@ -582,18 +609,6 @@ The following configuration options are available for category index generation:
582609
categories_slugify_separator: "-"
583610
```
584611

585-
[`categories_toc`](#+blog.categories_toc){ #+blog.categories_toc }
586-
587-
: :octicons-milestone-24: Default: `false` – This option specifies whether a
588-
category index includes a table of contents with all post titles on the
589-
right side as an overview:
590-
591-
``` yaml
592-
plugins:
593-
- blog:
594-
categories_toc: true
595-
```
596-
597612
[`categories_allowed`](#+blog.categories_allowed){ #+blog.categories_allowed }
598613

599614
: :octicons-milestone-24: Default: _none_ – This option specifies the
@@ -610,6 +625,18 @@ The following configuration options are available for category index generation:
610625
- Performance
611626
```
612627

628+
[`categories_toc`](#+blog.categories_toc){ #+blog.categories_toc }
629+
630+
: :octicons-milestone-24: Default: `false` – This option specifies whether a
631+
category index includes a table of contents with all post titles on the
632+
right side as an overview:
633+
634+
``` yaml
635+
plugins:
636+
- blog:
637+
categories_toc: true
638+
```
639+
613640
#### Pagination
614641

615642
The following configuration options are available for index pagination:

0 commit comments

Comments
 (0)