@@ -19,7 +19,7 @@ __Check out our [blog], which is created with the new [built-in blog plugin]!__
19
19
20
20
### Built-in blog plugin
21
21
22
- [ :octicons-tag-24: 9.2.0b0 ] [ Blog plugin support ] ·
22
+ [ :octicons-tag-24: 9.2.0 ] [ Blog plugin support ] ·
23
23
:octicons-cpu-24: Plugin ·
24
24
:octicons-beaker-24: Experimental
25
25
@@ -126,7 +126,7 @@ back here later for fine-tuning the output.__
126
126
127
127
---
128
128
129
- [Blog plugin support] : https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
129
+ [Blog plugin support] : https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
130
130
[Insiders] : ../insiders/index.md
131
131
[built-in plugins] : ../insiders/getting-started.md#built-in-plugins
132
132
[this is configurable] : # +blog.blog_dir
@@ -138,6 +138,22 @@ back here later for fine-tuning the output.__
138
138
139
139
The following configuration options are available for posts :
140
140
141
+ [`post_dir`](#+blog.post_dir){ # +blog.post_dir }
142
+
143
+ : :octicons-milestone-24 : Default: `{blog}/posts` – This option specifies
144
+ the name of the folder in which the blog plugin should look for posts.
145
+ The default settings assumes that the folder is called `posts` :
146
+
147
+ ` ` ` yaml
148
+ plugins:
149
+ - blog:
150
+ post_dir: blog/posts
151
+ ` ` `
152
+
153
+ The path must be defined relative to [`docs_dir`][docs_dir]. Note that the
154
+ ` {blog}` placeholder is replaced with the value specified in
155
+ [`blog_dir`][this is configurable].
156
+
141
157
[`post_date_format`](#+blog.post_date_format){ # +blog.post_date_format }
142
158
143
159
: :octicons-milestone-24 : Default: `long` – This option specifies the date
@@ -689,7 +705,7 @@ The following configuration options are available for index pagination:
689
705
pagination_url_format: "{page}"
690
706
` ` `
691
707
692
- [`pagination_template `](#+blog.pagination_template ){ # +blog.pagination_template }
708
+ [`pagination_format `](#+blog.pagination_format ){ # +blog.pagination_format }
693
709
694
710
: :octicons-milestone-24 : Default: `~2~` – This option specifies the format
695
711
string that is provided to the [paginate] module, which allows to customize
@@ -700,23 +716,23 @@ The following configuration options are available for index pagination:
700
716
` ` ` yaml
701
717
plugins:
702
718
- blog:
703
- pagination_template : "~2~"
719
+ pagination_format : "~2~"
704
720
` ` `
705
721
706
722
=== "1 2 3 .. n :material-chevron-right : :material-chevron-double-right:"
707
723
708
724
` ` ` yaml
709
725
plugins:
710
726
- blog:
711
- pagination_template : "$link_first $link_previous ~2~ $link_next $link_last"
727
+ pagination_format : "$link_first $link_previous ~2~ $link_next $link_last"
712
728
` ` `
713
729
714
730
=== "1 :material-chevron-right:"
715
731
716
732
` ` ` yaml
717
733
plugins:
718
734
- blog:
719
- pagination_template : "$link_previous $page $link_next"
735
+ pagination_format : "$link_previous $page $link_next"
720
736
` ` `
721
737
722
738
The [paginate] module exposes the following placeholders :
@@ -736,6 +752,18 @@ The following configuration options are available for index pagination:
736
752
737
753
[paginate] : https://pypi.org/project/paginate/
738
754
755
+ [`pagination_if_single_page`](#+blog.pagination_if_single_page){ # +blog.pagination_if_single_page }
756
+
757
+ : :octicons-milestone-24 : Default: `false` – This option specifies whether
758
+ the pagination should also be rendered if all posts fit into a single page.
759
+ If you wish to always render pagination, add :
760
+
761
+ ` ` ` yaml
762
+ plugins:
763
+ - blog:
764
+ pagination_if_single_page: true
765
+ ` ` `
766
+
739
767
[`pagination_keep_content`](#+blog.pagination_keep_content){ # +blog.pagination_keep_content }
740
768
741
769
: :octicons-milestone-24 : Default: `false` – This option specifies whether
@@ -767,19 +795,20 @@ The following configuration options are available for author info:
767
795
768
796
[`authors_file`](#+blog.authors_file){ # +blog.authors_file }
769
797
770
- : :octicons-milestone-24 : Default: `.authors.yml` – This option specifies the
771
- name of the file where the authors for your posts resides. The default
772
- settings assumes that the file is called `.authors.yml` (mind the `.` at
773
- the beginning) :
798
+ : :octicons-milestone-24 : Default: `{blog}/ .authors.yml` – This option
799
+ specifies the name of the file where the authors for your posts resides.
800
+ The default settings assumes that the file is called `.authors.yml`
801
+ (mind the `.` at the beginning) :
774
802
775
803
` ` ` yaml
776
804
plugins:
777
805
- blog:
778
806
authors_file: blog/.authors.yml
779
807
` ` `
780
808
781
- The path must be defined relative to [`docs_dir`][docs_dir].
782
- Also see the section on [adding authors].
809
+ The path must be defined relative to [`docs_dir`][docs_dir]. Note that the
810
+ ` {blog}` placeholder is replaced with the value specified in
811
+ [`blog_dir`][this is configurable]. Also see the section on [adding authors].
783
812
784
813
[adding authors] : # adding-authors
785
814
@@ -840,8 +869,7 @@ The following configuration options are available for drafts:
840
869
841
870
# ## RSS
842
871
843
- [:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
844
- [:octicons-tag-24 : insiders-4.23.0][Insiders] ·
872
+ [:octicons-tag-24 : 9.2.0][Blog plugin support] ·
845
873
[:octicons-cpu-24 : Plugin][rss]
846
874
847
875
The [built-in blog plugin] integrates seamlessly with the [RSS plugin][rss],
@@ -1359,14 +1387,10 @@ which means you can override all templates used for the blog by using
1359
1387
1360
1388
The following templates are added by the [built-in blog plugin] :
1361
1389
1362
- - [`blog.html`][blog.html] – Template for blog index
1390
+ - [`blog.html`][blog.html] – Template for blog, archive and category index
1363
1391
- [`blog-post.html`][blog-post.html] – Template for blog post
1364
- - [`blog-archive.html`][blog-archive.html] – Template for blog archive index
1365
- - [`blog-category.html`][blog-category.html] – Template for blog category index
1366
1392
1367
1393
[theme extension] : ../customization.md#extending-the-theme
1368
1394
1369
1395
[blog.html] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog.html
1370
- [blog-post.html] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-post.html
1371
- [blog-archive.html] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-archive.html
1372
- [blog-category.html] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-category.html
1396
+ [blog-post.html] : https://github.com/squidfunk/mkdocs-material-insiders/blob/master/src/blog-post.htmlhtml
0 commit comments