mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-30 09:43:05 -04:00
Updated Insiders changelog and blog plugin documentation
This commit is contained in:
@@ -294,6 +294,42 @@ The following configuration options are available for posts:
|
||||
post_excerpt: required
|
||||
```
|
||||
|
||||
[`post_excerpt_max_authors`](#+blog.post_excerpt_max_authors){ #+blog.post_excerpt_max_authors }
|
||||
|
||||
: :octicons-milestone-24: Default: `1` – This option specifies the number of
|
||||
authors rendered in post excerpts. While each post may be written by
|
||||
multiple authors, this setting allows to limit the display to just a few or
|
||||
even a single author, or disable authors in excerpts altogether:
|
||||
|
||||
=== "Render up to 2 authors in excerpts"
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
post_excerpt_max_authors: 2
|
||||
```
|
||||
|
||||
=== "Disable authors in excerpts"
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
post_excerpt_max_authors: 0
|
||||
```
|
||||
|
||||
[`post_excerpt_max_categories`](#+blog.post_excerpt_max_categories){ #+blog.post_excerpt_max_categories }
|
||||
|
||||
: :octicons-milestone-24: Default: `5` – This option specifies the number of
|
||||
categories rendered in post excerpts. While each post may be assigned to
|
||||
multiple categories, the [built-in blog plugin] can be instructed to only
|
||||
show the first `n` categories to keep it short and concise:
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
post_excerpt_max_categories: 5
|
||||
```
|
||||
|
||||
[`post_excerpt_separator`](#+blog.post_excerpt_separator){ #+blog.post_excerpt_separator }
|
||||
|
||||
: :octicons-milestone-24: Default: `<!-- more -->` – This option specifies
|
||||
@@ -634,6 +670,18 @@ The following configuration options are available for index pagination:
|
||||
|
||||
[paginate]: https://pypi.org/project/paginate/
|
||||
|
||||
[`pagination_keep_content`](#+blog.pagination_keep_content){ #+blog.pagination_keep_content }
|
||||
|
||||
: :octicons-milestone-24: Default: `false` – This option specifies whether
|
||||
paginated index pages should inherit the custom content from the index
|
||||
page, i.e. the content of `blog/index.md`:
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
pagination_keep_content: true
|
||||
```
|
||||
|
||||
#### Authors
|
||||
|
||||
The following configuration options are available for author info:
|
||||
@@ -667,29 +715,6 @@ The following configuration options are available for author info:
|
||||
The path must be defined relative to [`blog_dir`][this is configurable].
|
||||
Also see the section on [adding authors].
|
||||
|
||||
[`authors_in_excerpt`](#+blog.authors_in_excerpt){ #+blog.authors_in_excerpt }
|
||||
|
||||
: :octicons-milestone-24: Default: `1` – This option specifies the number of
|
||||
authors rendered in post excerpts. While each post may be written by
|
||||
multiple authors, this setting allows to limit the display to just a few or
|
||||
even a single author, or disable authors in excerpts altogether:
|
||||
|
||||
=== "Render up to 2 authors in excerpts"
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
authors_in_excerpt: 2
|
||||
```
|
||||
|
||||
=== "Disable authors in excerpts"
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- blog:
|
||||
authors_in_excerpt: 0
|
||||
```
|
||||
|
||||
[adding authors]: #adding-authors
|
||||
|
||||
#### Drafts
|
||||
@@ -1198,6 +1223,59 @@ nav:
|
||||
|
||||
## Customization
|
||||
|
||||
### Custom index pages
|
||||
|
||||
[:octicons-tag-24: insiders-4.24.0][Insiders] ·
|
||||
:octicons-beaker-24: Experimental
|
||||
|
||||
If you want to add custom content to automatically generated [archive] and
|
||||
[category] indexes, e.g. to add a category description prior to the list of
|
||||
posts, you can manually create the category page in the same location where
|
||||
the [built-in blog plugin] would create it:
|
||||
|
||||
``` sh
|
||||
.
|
||||
├─ docs/
|
||||
│ └─ blog/
|
||||
│ ├─ category/
|
||||
│ │ └─ hello.md #(1)!
|
||||
│ ├─ posts/
|
||||
│ └─ index.md
|
||||
└─ mkdocs.yml
|
||||
```
|
||||
|
||||
1. The easiest way is to first [add the category] to the blog post, then take
|
||||
the URL generated by the [built-in blog plugin] and create the file at the
|
||||
corresponding location in the [`blog_dir`][this is configurable] folder.
|
||||
|
||||
Note that the shown directory listing is based on the default configuration.
|
||||
If you specify different values for the following options, be sure to adjust
|
||||
the path accordingly:
|
||||
|
||||
- [`blog_dir`][this is configurable]
|
||||
- [`categories_url_format`][categories_url_format]
|
||||
- [`categories_slugify`][categories_slugify]
|
||||
|
||||
You can now add arbitrary content to the newly created file, or set specific
|
||||
page properties for this page via front matter, e.g. to change the
|
||||
[page description]:
|
||||
|
||||
``` yaml
|
||||
---
|
||||
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
|
||||
---
|
||||
|
||||
# Hello
|
||||
...
|
||||
```
|
||||
|
||||
All posts belonging to the category will be automatically appended.
|
||||
|
||||
[add the category]: #adding-categories
|
||||
[page description]: ../reference/index.md#setting-the-page-description
|
||||
[categories_url_format]: #+blog.categories_url_format
|
||||
[categories_slugify]: #+blog.categories_slugify
|
||||
|
||||
### Overriding templates
|
||||
|
||||
The [built-in blog plugin] is built on the same basis as Material for MkDocs,
|
||||
|
||||
Reference in New Issue
Block a user