Prepare 9.4.12 release

This commit is contained in:
squidfunk 2023-11-24 10:47:24 +01:00
parent 772e159664
commit bf6e66bddd
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
10 changed files with 92 additions and 5 deletions

View File

@ -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) mkdocs-material-9.4.11+insiders-4.44.0 (2023-11-23)
* Added pagination settings for archive pages in blog plugin * Added pagination settings for archive pages in blog plugin

View File

@ -2,6 +2,11 @@
## Material for MkDocs ## 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" } ### 9.4.11 <small>November 23, 2023</small> { id="9.4.11" }
- Fixed #6364: Search plugin crashing when enabling theme while serving - Fixed #6364: Search plugin crashing when enabling theme while serving

View File

@ -2,6 +2,12 @@
## Material for MkDocs Insiders ## 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" } ### 4.44.0 <small>November 23, 2023</small> { id="4.44.0" }
- Added pagination settings for archive pages in blog plugin - Added pagination settings for archive pages in blog plugin

View File

@ -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:setting config.categories_allowed -->
<!-- md:version 9.2.0 --> <!-- md:version 9.2.0 -->

View File

@ -265,6 +265,27 @@
"type": "string", "type": "string",
"default": "\"-\"" "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": { "categories_allowed": {
"title": "Categories allowed", "title": "Categories allowed",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_allowed", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/plugins/blog/#config.categories_allowed",

View File

@ -45,6 +45,8 @@ the blog, but can be helpful for customizations:
- [`archive_pagination`][config.archive_pagination] - [`archive_pagination`][config.archive_pagination]
- [`archive_pagination_per_page`][config.archive_pagination_per_page] - [`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`][config.categories_pagination]
- [`categories_pagination_per_page`][config.categories_pagination_per_page] - [`categories_pagination_per_page`][config.categories_pagination_per_page]
@ -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]: ../plugins/blog.md#config.archive_pagination
[config.archive_pagination_per_page]: ../plugins/blog.md#config.archive_pagination_per_page [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]: ../plugins/blog.md#config.categories_pagination
[config.categories_pagination_per_page]: ../plugins/blog.md#config.categories_pagination_per_page [config.categories_pagination_per_page]: ../plugins/blog.md#config.categories_pagination_per_page

View File

@ -18,4 +18,4 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
__version__ = "9.4.11" __version__ = "9.4.12"

View File

@ -32,7 +32,7 @@
<link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}"> <link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}">
{% endif %} {% endif %}
<link rel="icon" href="{{ config.theme.favicon | url }}"> <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 %} {% endblock %}
{% block htmltitle %} {% block htmltitle %}
{% if page.meta and page.meta.title %} {% if page.meta and page.meta.title %}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "mkdocs-material", "name": "mkdocs-material",
"version": "9.4.11", "version": "9.4.12",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mkdocs-material", "name": "mkdocs-material",
"version": "9.4.11", "version": "9.4.12",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"clipboard": "^2.0.11", "clipboard": "^2.0.11",

View File

@ -1,6 +1,6 @@
{ {
"name": "mkdocs-material", "name": "mkdocs-material",
"version": "9.4.11", "version": "9.4.12",
"description": "Documentation that simply works", "description": "Documentation that simply works",
"keywords": [ "keywords": [
"mkdocs", "mkdocs",