Skip to content

Commit de0fc51

Browse files
committed
Documentation
1 parent 4759c7a commit de0fc51

File tree

6 files changed

+61
-31
lines changed

6 files changed

+61
-31
lines changed

docs/reference/annotations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Some popular choices:
7575

7676
### Using annotations
7777

78-
[:octicons-tag-24: 9.2.0b0][Annotation support] ·
78+
[:octicons-tag-24: 9.2.0][Annotation support] ·
7979
:octicons-beaker-24: Experimental
8080

8181
Annotations consist of two parts: a marker, which can be placed anywhere in
@@ -104,7 +104,7 @@ Note that the `annotate` class must only be added to the outermost block. All
104104
nested elements can use the same list to define annotations, except when
105105
annotations are nested themselves.
106106

107-
[Annotation support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
107+
[Annotation support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
108108

109109
#### in annotations
110110

docs/reference/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ description: Nullam urna elit, malesuada eget finibus ut, ac tortor. # (1)!
121121

122122
### Setting the page `icon`
123123

124-
[:octicons-tag-24: 9.2.0b0][Page icon support] ·
124+
[:octicons-tag-24: 9.2.0][Page icon support] ·
125125
:octicons-beaker-24: Experimental
126126

127127
An icon can be assigned to each page, which is then rendered as part of the
@@ -149,14 +149,14 @@ icon: material/emoticon-happy # (1)!
149149
</div>
150150
</div>
151151

152-
[Page icon support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
152+
[Page icon support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
153153
[Insiders]: ../insiders/index.md
154154
[icon search]: icons-emojis.md#search
155155
[navigation tabs]: ../setup/setting-up-navigation.md#navigation-tabs
156156

157157
### Setting the page `status`
158158

159-
[:octicons-tag-24: 9.2.0b0][Page status support] ·
159+
[:octicons-tag-24: 9.2.0][Page status support] ·
160160
:octicons-beaker-24: Experimental
161161

162162
A status can be assigned to each page, which is then displayed as part of the
@@ -197,7 +197,7 @@ The following status identifiers are currently supported:
197197
- :material-alert-decagram: – `new`
198198
- :material-trash-can: – `deprecated`
199199

200-
[Page status support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
200+
[Page status support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
201201

202202
### Setting the page `subtitle`
203203

docs/schema/plugins/blog.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
"type": "boolean",
3434
"default": false
3535
},
36+
"post_dir": {
37+
"title": "Blog posts directory",
38+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.post_dir",
39+
"type": "string",
40+
"default": "\"{blog}/posts\""
41+
},
3642
"post_date_format": {
3743
"title": "Format string for post dates",
3844
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.post_date_format",
@@ -329,7 +335,7 @@
329335
"title": "Authors file",
330336
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-a-blog/#+blog.authors_file",
331337
"type": "string",
332-
"default": ".authors.yml"
338+
"default": "\"{blog}/.authors.yml\""
333339
},
334340
"draft": {
335341
"title": "Render posts marked as drafts",

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

+44-20
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ __Check out our [blog], which is created with the new [built-in blog plugin]!__
1919

2020
### Built-in blog plugin
2121

22-
[:octicons-tag-24: 9.2.0b0][Blog plugin support] ·
22+
[:octicons-tag-24: 9.2.0][Blog plugin support] ·
2323
:octicons-cpu-24: Plugin ·
2424
:octicons-beaker-24: Experimental
2525

@@ -126,7 +126,7 @@ back here later for fine-tuning the output.__
126126

127127
---
128128

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
130130
[Insiders]: ../insiders/index.md
131131
[built-in plugins]: ../insiders/getting-started.md#built-in-plugins
132132
[this is configurable]: #+blog.blog_dir
@@ -138,6 +138,22 @@ back here later for fine-tuning the output.__
138138

139139
The following configuration options are available for posts:
140140

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+
141157
[`post_date_format`](#+blog.post_date_format){ #+blog.post_date_format }
142158

143159
: :octicons-milestone-24: Default: `long` – This option specifies the date
@@ -689,7 +705,7 @@ The following configuration options are available for index pagination:
689705
pagination_url_format: "{page}"
690706
```
691707

692-
[`pagination_template`](#+blog.pagination_template){ #+blog.pagination_template }
708+
[`pagination_format`](#+blog.pagination_format){ #+blog.pagination_format }
693709

694710
: :octicons-milestone-24: Default: `~2~` – This option specifies the format
695711
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:
700716
``` yaml
701717
plugins:
702718
- blog:
703-
pagination_template: "~2~"
719+
pagination_format: "~2~"
704720
```
705721

706722
=== "1 2 3 .. n :material-chevron-right: :material-chevron-double-right:"
707723

708724
``` yaml
709725
plugins:
710726
- 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"
712728
```
713729

714730
=== "1 :material-chevron-right:"
715731

716732
``` yaml
717733
plugins:
718734
- blog:
719-
pagination_template: "$link_previous $page $link_next"
735+
pagination_format: "$link_previous $page $link_next"
720736
```
721737

722738
The [paginate] module exposes the following placeholders:
@@ -736,6 +752,18 @@ The following configuration options are available for index pagination:
736752

737753
[paginate]: https://pypi.org/project/paginate/
738754

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+
739767
[`pagination_keep_content`](#+blog.pagination_keep_content){ #+blog.pagination_keep_content }
740768

741769
: :octicons-milestone-24: Default: `false` – This option specifies whether
@@ -767,19 +795,20 @@ The following configuration options are available for author info:
767795

768796
[`authors_file`](#+blog.authors_file){ #+blog.authors_file }
769797

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):
774802

775803
``` yaml
776804
plugins:
777805
- blog:
778806
authors_file: blog/.authors.yml
779807
```
780808

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].
783812

784813
[adding authors]: #adding-authors
785814

@@ -840,8 +869,7 @@ The following configuration options are available for drafts:
840869

841870
### RSS
842871

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] ·
845873
[:octicons-cpu-24: Plugin][rss]
846874

847875
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
13591387

13601388
The following templates are added by the [built-in blog plugin]:
13611389

1362-
- [`blog.html`][blog.html] – Template for blog index
1390+
- [`blog.html`][blog.html] – Template for blog, archive and category index
13631391
- [`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
13661392

13671393
[theme extension]: ../customization.md#extending-the-theme
13681394

13691395
[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

docs/setup/setting-up-navigation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ theme:
223223

224224
### Navigation pruning
225225

226-
[:octicons-tag-24: 9.2.0b0][Navigation pruning support] ·
226+
[:octicons-tag-24: 9.2.0][Navigation pruning support] ·
227227
:octicons-beaker-24: Experimental
228228

229229
When pruning is enabled, only the visible navigation items are included in the
@@ -245,7 +245,7 @@ This feature flag is especially useful for documentation sites with 100+ or even
245245
Navigation pruning will replace all expandable sections with links to the first
246246
page in that section (or the section index page).
247247

248-
[Navigation pruning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
248+
[Navigation pruning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
249249
[navigation.expand]: #navigation-expansion
250250

251251
### Section index pages

docs/setup/setting-up-site-search.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ The following configuration options are supported:
191191

192192
#### Chinese language support
193193

194-
[:octicons-tag-24: 9.2.0b0][Chinese language support] ·
194+
[:octicons-tag-24: 9.2.0][Chinese language support] ·
195195
:octicons-beaker-24: Experimental
196196

197197
In order to add support for Chinese languages to the [built-in search plugin],
@@ -236,7 +236,7 @@ The following configuration options are available:
236236
User dictionaries can be used for tuning the segmenter to preserve
237237
technical terms.
238238

239-
[Chinese language support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0b0
239+
[Chinese language support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
240240
[chinese search]: ../blog/posts/chinese-search-support.md
241241
[jieba]: https://pypi.org/project/jieba/
242242
[built-in search plugin]: #built-in-search-plugin

0 commit comments

Comments
 (0)