Skip to content

Commit bf6e66b

Browse files
committed
Prepare 9.4.12 release
1 parent 772e159 commit bf6e66b

10 files changed

Lines changed: 92 additions & 5 deletions

File tree

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
mkdocs-material-9.4.12+insiders-4.45.0 (2023-11-24)
2+
3+
* Added support for sorting blog categories by post count or custom function
4+
* Improved tags plugin to generate Unicode-aware slugs by default
5+
* Fixed non-deterministic order of multiple authors in blog plugin
6+
7+
mkdocs-material-9.4.12 (2023-11-24)
8+
9+
* Improved blog plugin to generate Unicode-aware slugs by default
10+
* Fixed non-deterministic order of categories in blog plugin
11+
112
mkdocs-material-9.4.11+insiders-4.44.0 (2023-11-23)
213

314
* Added pagination settings for archive pages in blog plugin

docs/changelog/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Material for MkDocs
44

5+
### 9.4.12 <small>November 24, 2023</small> { id="9.4.12" }
6+
7+
- Improved blog plugin to generate Unicode-aware slugs by default
8+
- Fixed non-deterministic order of categories in blog plugin
9+
510
### 9.4.11 <small>November 23, 2023</small> { id="9.4.11" }
611

712
- Fixed #6364: Search plugin crashing when enabling theme while serving

docs/insiders/changelog/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Material for MkDocs Insiders
44

5+
### 4.45.0 <small>November 24, 2023</small> { id="4.45.0" }
6+
7+
- Added support for sorting blog categories by post count or custom function
8+
- Improved tags plugin to generate Unicode-aware slugs by default
9+
- Fixed non-deterministic order of multiple authors in blog plugin
10+
511
### 4.44.0 <small>November 23, 2023</small> { id="4.44.0" }
612

713
- Added pagination settings for archive pages in blog plugin

docs/plugins/blog.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,46 @@ plugins:
882882

883883
---
884884

885+
#### <!-- md:setting config.categories_sort_by -->
886+
887+
<!-- md:sponsors -->
888+
<!-- md:version insiders-4.45.0 -->
889+
<!-- md:default `material.plugins.blog.view_name` -->
890+
891+
Use this setting to specify a custom function for sorting categories. For
892+
example, if you want to sort categories by the number of posts they contain,
893+
use the following configuration:
894+
895+
``` yaml
896+
plugins:
897+
- blog:
898+
categories_sort_by: !!python/name:material.plugins.blog.view_post_count
899+
```
900+
901+
Don't forget to enable [`categories_sort_reverse`][config.categories_sort_reverse].
902+
You can define your own comparison function, which must return something
903+
that can be compared while sorting, i.e., a string or number.
904+
905+
---
906+
907+
#### <!-- md:setting config.categories_sort_reverse -->
908+
909+
<!-- md:sponsors -->
910+
<!-- md:version insiders-4.45.0 -->
911+
<!-- md:default `false` -->
912+
913+
Use this setting to reverse the order in which categories are sorted. By
914+
default, categories are sorted in ascending order, but you can reverse ordering
915+
as follows:
916+
917+
``` yaml
918+
plugins:
919+
- blog:
920+
categories_sort_reverse: true
921+
```
922+
923+
---
924+
885925
#### <!-- md:setting config.categories_allowed -->
886926

887927
<!-- md:version 9.2.0 -->

docs/schema/plugins/blog.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,27 @@
265265
"type": "string",
266266
"default": "\"-\""
267267
},
268+
"categories_sort_by": {
269+
"title": "Sort categories by this function",
270+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_sort_by",
271+
"default": "!!python/name:material.plugins.blog.view_name",
272+
"oneOf": [
273+
{
274+
"type": "string"
275+
},
276+
{
277+
"enum": [
278+
"!!python/name:material.plugins.blog.view_name",
279+
"!!python/name:material.plugins.blog.view_post_count"
280+
]
281+
}
282+
]
283+
},
284+
"categories_sort_reverse": {
285+
"title": "Soft categories in reverse",
286+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_sort_reverse",
287+
"default": false
288+
},
268289
"categories_allowed": {
269290
"title": "Categories allowed",
270291
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_allowed",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ the blog, but can be helpful for customizations:
4545
4646
- [`archive_pagination`][config.archive_pagination]
4747
- [`archive_pagination_per_page`][config.archive_pagination_per_page]
48+
- [`categories_sort_by`][config.categories_sort_by]
49+
- [`categories_sort_reverse`][config.categories_sort_reverse]
4850
- [`categories_pagination`][config.categories_pagination]
4951
- [`categories_pagination_per_page`][config.categories_pagination_per_page]
5052

@@ -60,6 +62,8 @@ We'll add more settings here, as we discover new use cases.
6062

6163
[config.archive_pagination]: ../plugins/blog.md#config.archive_pagination
6264
[config.archive_pagination_per_page]: ../plugins/blog.md#config.archive_pagination_per_page
65+
[config.categories_sort_by]: ../plugins/blog.md#config.categories_sort_by
66+
[config.categories_sort_reverse]: ../plugins/blog.md#config.categories_sort_reverse
6367
[config.categories_pagination]: ../plugins/blog.md#config.categories_pagination
6468
[config.categories_pagination_per_page]: ../plugins/blog.md#config.categories_pagination_per_page
6569

material/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
# IN THE SOFTWARE.
2020

21-
__version__ = "9.4.11"
21+
__version__ = "9.4.12"

material/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}">
3333
{% endif %}
3434
<link rel="icon" href="{{ config.theme.favicon | url }}">
35-
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.4.11">
35+
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.4.12">
3636
{% endblock %}
3737
{% block htmltitle %}
3838
{% if page.meta and page.meta.title %}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mkdocs-material",
3-
"version": "9.4.11",
3+
"version": "9.4.12",
44
"description": "Documentation that simply works",
55
"keywords": [
66
"mkdocs",

0 commit comments

Comments
 (0)