Skip to content

Commit a6772cf

Browse files
committed
Added documentation on new advanced blog settings
1 parent 120a9be commit a6772cf

File tree

2 files changed

+98
-2
lines changed

2 files changed

+98
-2
lines changed

docs/plugins/blog.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,14 +731,50 @@ The following placeholders are available:
731731

732732
---
733733

734+
#### <!-- md:setting config.archive_pagination -->
735+
736+
<!-- md:sponsors -->
737+
<!-- md:version insiders-4.44.0 -->
738+
<!-- md:default `true` -->
739+
740+
Use this setting to enable or disable pagination for archive pages. The value
741+
of this setting is inherited from [`pagination`][config.pagination], unless it's
742+
explicitly set. To disable pagination, use:
743+
744+
``` yaml
745+
plugins:
746+
- blog:
747+
archive_pagination: false
748+
```
749+
750+
---
751+
752+
#### <!-- md:setting config.archive_pagination_per_page -->
753+
754+
<!-- md:sponsors -->
755+
<!-- md:version insiders-4.44.0 -->
756+
<!-- md:default `10` -->
757+
758+
Use this setting to change the number of posts rendered per archive page. The
759+
value of this setting is inherited from [`pagination_per_page`]
760+
[config.pagination_per_page], unless it's explicitly set:
761+
762+
``` yaml
763+
plugins:
764+
- blog:
765+
archive_pagination_per_page: 5
766+
```
767+
768+
---
769+
734770
#### <!-- md:setting config.archive_toc -->
735771

736772
<!-- md:version 9.2.0 -->
737773
<!-- md:default `false` -->
738774

739775
Use this setting to leverage the table of contents to display post titles on all
740776
archive pages. The value of this setting is inherited from [`blog_toc`]
741-
[config.blog_toc], unless its explicitly set:
777+
[config.blog_toc], unless it's explicitly set:
742778

743779
``` yaml
744780
plugins:
@@ -888,14 +924,50 @@ this list. Posts can be assigned to categories by using the [`categories`]
888924

889925
---
890926

927+
#### <!-- md:setting config.categories_pagination -->
928+
929+
<!-- md:sponsors -->
930+
<!-- md:version insiders-4.44.0 -->
931+
<!-- md:default `true` -->
932+
933+
Use this setting to enable or disable pagination for category pages. The value
934+
of this setting is inherited from [`pagination`][config.pagination], unless it's
935+
explicitly set. To disable pagination, use:
936+
937+
``` yaml
938+
plugins:
939+
- blog:
940+
categories_pagination: false
941+
```
942+
943+
---
944+
945+
#### <!-- md:setting config.categories_pagination_per_page -->
946+
947+
<!-- md:sponsors -->
948+
<!-- md:version insiders-4.44.0 -->
949+
<!-- md:default `10` -->
950+
951+
Use this setting to change the number of posts rendered per category page. The
952+
value of this setting is inherited from [`pagination_per_page`]
953+
[config.pagination_per_page], unless it's explicitly set:
954+
955+
``` yaml
956+
plugins:
957+
- blog:
958+
categories_pagination_per_page: 5
959+
```
960+
961+
---
962+
891963
#### <!-- md:setting config.categories_toc -->
892964

893965
<!-- md:version 9.2.0 -->
894966
<!-- md:default `false` -->
895967

896968
Use this setting to leverage the table of contents to display post titles on all
897969
category pages. The value of this setting is inherited from [`blog_toc`]
898-
[config.blog_toc], unless its explicitly set:
970+
[config.blog_toc], unless it's explicitly set:
899971

900972
``` yaml
901973
plugins:

docs/schema/plugins/blog.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,18 @@
209209
}
210210
]
211211
},
212+
"archive_pagination": {
213+
"title": "Pagination for archive pages",
214+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_pagination",
215+
"type": "boolean",
216+
"default": true
217+
},
218+
"archive_pagination_per_page": {
219+
"title": "Posts per page for archive pages",
220+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_pagination_per_page",
221+
"type": "number",
222+
"default": 10
223+
},
212224
"archive_toc": {
213225
"title": "Archive table of contents",
214226
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.archive_toc",
@@ -263,6 +275,18 @@
263275
"uniqueItems": true,
264276
"default": []
265277
},
278+
"categories_pagination": {
279+
"title": "Pagination for categories",
280+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_pagination",
281+
"type": "boolean",
282+
"default": true
283+
},
284+
"categories_pagination_per_page": {
285+
"title": "Posts per page for categories",
286+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_pagination_per_page",
287+
"type": "number",
288+
"default": 10
289+
},
266290
"categories_toc": {
267291
"title": "Categories table of contents",
268292
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_toc",

0 commit comments

Comments
 (0)