From a6772cf5e883f46bfd2a36e4d332983d03df1cc2 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 23 Nov 2023 11:26:05 +0100 Subject: [PATCH] Added documentation on new advanced blog settings --- docs/plugins/blog.md | 76 ++++++++++++++++++++++++++++++++++- docs/schema/plugins/blog.json | 24 +++++++++++ 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/docs/plugins/blog.md b/docs/plugins/blog.md index 6eac717d7..3c36f511c 100644 --- a/docs/plugins/blog.md +++ b/docs/plugins/blog.md @@ -731,6 +731,42 @@ The following placeholders are available: --- +#### + + + + + +Use this setting to enable or disable pagination for archive pages. The value +of this setting is inherited from [`pagination`][config.pagination], unless it's +explicitly set. To disable pagination, use: + +``` yaml +plugins: + - blog: + archive_pagination: false +``` + +--- + +#### + + + + + +Use this setting to change the number of posts rendered per archive page. The +value of this setting is inherited from [`pagination_per_page`] +[config.pagination_per_page], unless it's explicitly set: + +``` yaml +plugins: + - blog: + archive_pagination_per_page: 5 +``` + +--- + #### @@ -738,7 +774,7 @@ The following placeholders are available: Use this setting to leverage the table of contents to display post titles on all archive pages. The value of this setting is inherited from [`blog_toc`] -[config.blog_toc], unless its explicitly set: +[config.blog_toc], unless it's explicitly set: ``` yaml plugins: @@ -888,6 +924,42 @@ this list. Posts can be assigned to categories by using the [`categories`] --- +#### + + + + + +Use this setting to enable or disable pagination for category pages. The value +of this setting is inherited from [`pagination`][config.pagination], unless it's +explicitly set. To disable pagination, use: + +``` yaml +plugins: + - blog: + categories_pagination: false +``` + +--- + +#### + + + + + +Use this setting to change the number of posts rendered per category page. The +value of this setting is inherited from [`pagination_per_page`] +[config.pagination_per_page], unless it's explicitly set: + +``` yaml +plugins: + - blog: + categories_pagination_per_page: 5 +``` + +--- + #### @@ -895,7 +967,7 @@ this list. Posts can be assigned to categories by using the [`categories`] Use this setting to leverage the table of contents to display post titles on all category pages. The value of this setting is inherited from [`blog_toc`] -[config.blog_toc], unless its explicitly set: +[config.blog_toc], unless it's explicitly set: ``` yaml plugins: diff --git a/docs/schema/plugins/blog.json b/docs/schema/plugins/blog.json index edce82c68..5413cbba7 100644 --- a/docs/schema/plugins/blog.json +++ b/docs/schema/plugins/blog.json @@ -209,6 +209,18 @@ } ] }, + "archive_pagination": { + "title": "Pagination for archive pages", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_pagination", + "type": "boolean", + "default": true + }, + "archive_pagination_per_page": { + "title": "Posts per page for archive pages", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_pagination_per_page", + "type": "number", + "default": 10 + }, "archive_toc": { "title": "Archive table of contents", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_toc", @@ -263,6 +275,18 @@ "uniqueItems": true, "default": [] }, + "categories_pagination": { + "title": "Pagination for categories", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_pagination", + "type": "boolean", + "default": true + }, + "categories_pagination_per_page": { + "title": "Posts per page for categories", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_pagination_per_page", + "type": "number", + "default": 10 + }, "categories_toc": { "title": "Categories table of contents", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_toc",