From 921a6302ae5a35d5487646010bee5d7e6ad2dbbc Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 18 Feb 2023 15:20:37 +0100 Subject: [PATCH] Documentation --- docs/schema/plugins/blog.json | 24 ++++++++++++---- docs/setup/setting-up-a-blog.md | 51 +++++++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/docs/schema/plugins/blog.json b/docs/schema/plugins/blog.json index 39548988b..380e63e9a 100644 --- a/docs/schema/plugins/blog.json +++ b/docs/schema/plugins/blog.json @@ -27,6 +27,12 @@ "type": "string", "default": "blog" }, + "blog_toc": { + "title": "Blog table of contents", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.blog_toc", + "type": "boolean", + "default": false + }, "post_date_format": { "title": "Format string for post dates", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.post_date_format", @@ -203,6 +209,12 @@ } ] }, + "archive_toc": { + "title": "Archive table of contents", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.archive_toc", + "type": "boolean", + "default": false + }, "categories": { "title": "Categories", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories", @@ -241,12 +253,6 @@ "type": "string", "default": "\"-\"" }, - "categories_toc": { - "title": "Category index table of contents", - "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_toc", - "type": "boolean", - "default": false - }, "categories_allowed": { "title": "Categories allowed", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_allowed", @@ -257,6 +263,12 @@ "uniqueItems": true, "default": [] }, + "categories_toc": { + "title": "Categories table of contents", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.categories_toc", + "type": "boolean", + "default": false + }, "pagination": { "title": "Pagination", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.pagination", diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md index 2f5027ac1..1470cf79d 100644 --- a/docs/setup/setting-up-a-blog.md +++ b/docs/setup/setting-up-a-blog.md @@ -106,6 +106,21 @@ The following configuration options are available: The path must be defined relative to [`docs_dir`][docs_dir]. +[`blog_toc`](#+blog.blog_toc){ #+blog.blog_toc } + +: :octicons-milestone-24: Default: `false` – This option specifies whether + indexes include a table of contents with all post titles on the + right side as an overview: + + ``` yaml + plugins: + - blog: + blog_toc: true + ``` + + Note that this setting is also used as the default value for `archive_toc` + and `categories_toc`, unless those settings are explicitly defined. + __The built-in blog plugin has dozens of options that allow for advanced configuration. It's a good idea to [start writing your first post], and come back here later for fine-tuning the output.__ @@ -493,6 +508,18 @@ The following configuration options are available for archive index generation: archive_url_format: "{date}" ``` +[`archive_toc`](#+blog.archive_toc){ #+blog.archive_toc } + +: :octicons-milestone-24: Default: `false` – This option specifies whether an + archive index includes a table of contents with all post titles on the + right side as an overview: + + ``` yaml + plugins: + - blog: + archive_toc: true + ``` + #### Categories The following configuration options are available for category index generation: @@ -582,18 +609,6 @@ The following configuration options are available for category index generation: categories_slugify_separator: "-" ``` -[`categories_toc`](#+blog.categories_toc){ #+blog.categories_toc } - -: :octicons-milestone-24: Default: `false` – This option specifies whether a - category index includes a table of contents with all post titles on the - right side as an overview: - - ``` yaml - plugins: - - blog: - categories_toc: true - ``` - [`categories_allowed`](#+blog.categories_allowed){ #+blog.categories_allowed } : :octicons-milestone-24: Default: _none_ – This option specifies the @@ -610,6 +625,18 @@ The following configuration options are available for category index generation: - Performance ``` +[`categories_toc`](#+blog.categories_toc){ #+blog.categories_toc } + +: :octicons-milestone-24: Default: `false` – This option specifies whether a + category index includes a table of contents with all post titles on the + right side as an overview: + + ``` yaml + plugins: + - blog: + categories_toc: true + ``` + #### Pagination The following configuration options are available for index pagination: