Skip to content

Commit

Permalink
Prepare 9.4.12 release
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Nov 24, 2023
1 parent 772e159 commit bf6e66b
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
mkdocs-material-9.4.12+insiders-4.45.0 (2023-11-24)

* Added support for sorting blog categories by post count or custom function
* Improved tags plugin to generate Unicode-aware slugs by default
* Fixed non-deterministic order of multiple authors in blog plugin

mkdocs-material-9.4.12 (2023-11-24)

* Improved blog plugin to generate Unicode-aware slugs by default
* Fixed non-deterministic order of categories in blog plugin

mkdocs-material-9.4.11+insiders-4.44.0 (2023-11-23)

* Added pagination settings for archive pages in blog plugin
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Material for MkDocs

### 9.4.12 <small>November 24, 2023</small> { id="9.4.12" }

- Improved blog plugin to generate Unicode-aware slugs by default
- Fixed non-deterministic order of categories in blog plugin

### 9.4.11 <small>November 23, 2023</small> { id="9.4.11" }

- Fixed #6364: Search plugin crashing when enabling theme while serving
Expand Down
6 changes: 6 additions & 0 deletions docs/insiders/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Material for MkDocs Insiders

### 4.45.0 <small>November 24, 2023</small> { id="4.45.0" }

- Added support for sorting blog categories by post count or custom function
- Improved tags plugin to generate Unicode-aware slugs by default
- Fixed non-deterministic order of multiple authors in blog plugin

### 4.44.0 <small>November 23, 2023</small> { id="4.44.0" }

- Added pagination settings for archive pages in blog plugin
Expand Down
40 changes: 40 additions & 0 deletions docs/plugins/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,46 @@ plugins:

---

#### <!-- md:setting config.categories_sort_by -->

<!-- md:sponsors -->
<!-- md:version insiders-4.45.0 -->
<!-- md:default `material.plugins.blog.view_name` -->

Use this setting to specify a custom function for sorting categories. For
example, if you want to sort categories by the number of posts they contain,
use the following configuration:

``` yaml
plugins:
- blog:
categories_sort_by: !!python/name:material.plugins.blog.view_post_count
```

Don't forget to enable [`categories_sort_reverse`][config.categories_sort_reverse].
You can define your own comparison function, which must return something
that can be compared while sorting, i.e., a string or number.

---

#### <!-- md:setting config.categories_sort_reverse -->

<!-- md:sponsors -->
<!-- md:version insiders-4.45.0 -->
<!-- md:default `false` -->

Use this setting to reverse the order in which categories are sorted. By
default, categories are sorted in ascending order, but you can reverse ordering
as follows:

``` yaml
plugins:
- blog:
categories_sort_reverse: true
```

---

#### <!-- md:setting config.categories_allowed -->

<!-- md:version 9.2.0 -->
Expand Down
21 changes: 21 additions & 0 deletions docs/schema/plugins/blog.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,27 @@
"type": "string",
"default": "\"-\""
},
"categories_sort_by": {
"title": "Sort categories by this function",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_sort_by",
"default": "!!python/name:material.plugins.blog.view_name",
"oneOf": [
{
"type": "string"
},
{
"enum": [
"!!python/name:material.plugins.blog.view_name",
"!!python/name:material.plugins.blog.view_post_count"
]
}
]
},
"categories_sort_reverse": {
"title": "Soft categories in reverse",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_sort_reverse",
"default": false
},
"categories_allowed": {
"title": "Categories allowed",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_allowed",
Expand Down
4 changes: 4 additions & 0 deletions docs/setup/setting-up-a-blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ the blog, but can be helpful for customizations:

- [`archive_pagination`][config.archive_pagination]
- [`archive_pagination_per_page`][config.archive_pagination_per_page]
- [`categories_sort_by`][config.categories_sort_by]
- [`categories_sort_reverse`][config.categories_sort_reverse]
- [`categories_pagination`][config.categories_pagination]
- [`categories_pagination_per_page`][config.categories_pagination_per_page]

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

[config.archive_pagination]: ../plugins/blog.md#config.archive_pagination
[config.archive_pagination_per_page]: ../plugins/blog.md#config.archive_pagination_per_page
[config.categories_sort_by]: ../plugins/blog.md#config.categories_sort_by
[config.categories_sort_reverse]: ../plugins/blog.md#config.categories_sort_reverse
[config.categories_pagination]: ../plugins/blog.md#config.categories_pagination
[config.categories_pagination_per_page]: ../plugins/blog.md#config.categories_pagination_per_page

Expand Down
2 changes: 1 addition & 1 deletion material/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

__version__ = "9.4.11"
__version__ = "9.4.12"
2 changes: 1 addition & 1 deletion material/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}">
{% endif %}
<link rel="icon" href="{{ config.theme.favicon | url }}">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.4.11">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.4.12">
{% endblock %}
{% block htmltitle %}
{% if page.meta and page.meta.title %}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mkdocs-material",
"version": "9.4.11",
"version": "9.4.12",
"description": "Documentation that simply works",
"keywords": [
"mkdocs",
Expand Down

0 comments on commit bf6e66b

Please sign in to comment.