Skip to content

Commit 46ca6c5

Browse files
authored
Merge pull request #5683 from squidfunk/merge/piri-piri
Features tied to 'Piri Piri' funding goal
2 parents 6c8cd47 + a6f0bc4 commit 46ca6c5

File tree

173 files changed

+6667
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+6667
-1299
lines changed

CHANGELOG

+67
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
mkdocs-material-9.2.0 (2023-08-21)
2+
3+
Additions and improvements
4+
5+
* Added blogging support via built-in blog plugin
6+
* Added support for Chinese language segmentaiton in search plugin
7+
* Added support for adding custom dates to blog posts
8+
* Added support for paginating archive and category pages
9+
* Added support for annotations (outside of code blocks)
10+
* Added support for navigation icons
11+
* Added support for navigation pruning
12+
* Added support for navigation status
13+
* Added support for customizing site icons
14+
* Added support for customizing (code) annotation icons
15+
* Added focus outline to admonitions and details
16+
* Added prompt for bug report name to info plugin
17+
* Added Luxembourgish translations
18+
* Improved rendering of (code) annotation markers
19+
* Improved print styles for (code) annotations
20+
* Improved customizability of navigation tabs
21+
* Improved interop of plugins with external tools like mike
22+
* Improved interop of blog plugin with awesome pages plugin
23+
* Improved header partial by moving buttons into separate partials
24+
* Improved clarity of site_url warning in social plugin
25+
* Improved blog plugin to automatically setup directory structure
26+
* Switched info plugin to importlib to mitigate deprecations
27+
* Automatically download ResizeObserver polyfill when necessary
28+
* Automatically add iframe-worker polyfill when necessary in offline plugin
29+
* Automatically focus and bring up keyboard on touch devices
30+
* Updated Serbo-Croatian translations
31+
* Updated MkDocs to 1.5.2
32+
33+
Removals
34+
35+
* Removed Universal Analytics integration
36+
* Removed ancient polyfills to reduce size of bundled JavaScript by 20%
37+
* Removed necessity for Array.flat and Array.flatMap polyfill
38+
* Removed announcement bar button when JavaScript is not available
39+
40+
Fixes
41+
42+
* Fixed rendering of tags when announcement bar is present
43+
* Fixed tags plugin rendering pages excluded by other plugins
44+
* Fixed #5132: Blog plugin requires nav entry in mkdocs.yml
45+
* Fixed #5599: Insufficient contrast for default link color
46+
* Fixed #5715: Blog plugin missing integrated table of contents in pagination
47+
* Fixed #5806: Version selector not hoverable on some Android devices
48+
* Fixed #5826: Blog post drafts with tags show up in tags index
49+
150
mkdocs-material-9.1.21+insiders-4.39.0 (2023-08-01)
251

352
* Added support for hoisting theme media files when building projects
@@ -46,6 +95,24 @@ mkdocs-material-9.1.18+insiders-4.37.0 (2023-07-07)
4695
* Fixed jumping of content tabs anchor links when instant loading is enabled
4796
* Fixed #5676: Optimize plugin doesn't check for pngquant
4897

98+
mkdocs-material-9.2.0 (2023-07-06)
99+
100+
* Added blogging support via built-in blog plugin
101+
* Added Chinese language support to built-in search plugin
102+
* Added support for annotations (outside of code blocks)
103+
* Added support for navigation icons
104+
* Added support for navigation pruning
105+
* Added support for navigation status
106+
* Added support for customizing site icons
107+
* Improved rendering of (code) annotation markers
108+
* Improved print styles for (code) annotations
109+
* Improved customizability of navigation tabs
110+
* Removed Universal Analytics integration
111+
* Removed ancient polyfills to reduce size of bundled JavaScript by 20%
112+
* Removed necessity for Array.flat and Array.flatMap polyfill
113+
* Removed announcement bar button when JavaScript is not available
114+
* Automatically download ResizeObserver polyfill when necessary
115+
49116
mkdocs-material-9.1.18 (2023-07-03)
50117

51118
* Updated Danish translations

docs/browser-support.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ check the distribution of browser types and versions among your users.
4747
[open an issue]: https://github.com/squidfunk/mkdocs-material/issues/new/choose
4848
[caniuse.com]: https://caniuse.com/
4949
[:is pseudo selector]: https://caniuse.com/css-matches-pseudo
50+
[browser support]: #supported-browsers
51+
[built-in privacy plugin]: setup/ensuring-data-privacy.md#built-in-privacy-plugin
5052

5153
## Other browsers
5254

docs/changelog/index.md

+49
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,55 @@
22

33
## Material for MkDocs
44

5+
### 9.2.0 <small>July 6, 2023</small> { id="9.2.0" }
6+
7+
__Additions and improvements__
8+
9+
- Added blogging support via built-in blog plugin
10+
- Added support for Chinese language segmentaiton in search plugin
11+
- Added support for adding custom dates to blog posts
12+
- Added support for paginating archive and category pages
13+
- Added support for annotations (outside of code blocks)
14+
- Added support for navigation icons
15+
- Added support for navigation pruning
16+
- Added support for navigation status
17+
- Added support for customizing site icons
18+
- Added support for customizing (code) annotation icons
19+
- Added focus outline to admonitions and details
20+
- Added prompt for bug report name to info plugin
21+
- Added Luxembourgish translations
22+
- Improved rendering of (code) annotation markers
23+
- Improved print styles for (code) annotations
24+
- Improved customizability of navigation tabs
25+
- Improved interop of plugins with external tools like mike
26+
- Improved interop of blog plugin with awesome pages plugin
27+
- Improved header partial by moving buttons into separate partials
28+
- Improved clarity of `site_url` warning in social plugin
29+
- Improved blog plugin to automatically setup directory structure
30+
- Switched info plugin to `importlib` to mitigate deprecations
31+
- Automatically download ResizeObserver polyfill when necessary
32+
- Automatically add iframe-worker polyfill when necessary in offline plugin
33+
- Automatically focus and bring up keyboard on touch devices
34+
- Updated Serbo-Croatian translations
35+
- Updated MkDocs to 1.5.2
36+
37+
__Removals__
38+
39+
- Removed Universal Analytics integration
40+
- Removed ancient polyfills to reduce size of bundled JavaScript by 20%
41+
- Removed necessity for `Array.flat` and `Array.flatMap` polyfill
42+
- Removed announcement bar button when JavaScript is not available
43+
44+
__Fixes__
45+
46+
- Fixed rendering of tags when announcement bar is present
47+
- Fixed tags plugin rendering pages excluded by other plugins
48+
- Fixed #5132: Blog plugin requires `nav` entry in `mkdocs.yml`
49+
- Fixed #5599: Insufficient contrast for default link color
50+
- Fixed #5715: Blog plugin missing integrated table of contents in pagination
51+
- Fixed #5806: Version selector not hoverable on some Android devices
52+
- Fixed #5826: Blog post drafts with tags show up in tags index
53+
554
### 9.1.21 <small>July 27, 2023</small> { id="9.1.20" }
655

756
- Fixed MkDocs 1.4 compat issue in social plugin (9.1.20 regression)

docs/customization.md

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ assets may also be put in the `overrides` directory:
100100
│ │ └─ analytics.html # Analytics setup
101101
│ ├─ languages/ # Translation languages
102102
│ ├─ actions.html # Actions
103+
│ ├─ alternate.html # Site language selector
103104
│ ├─ comments.html # Comment system (empty by default)
104105
│ ├─ consent.html # Consent
105106
│ ├─ content.html # Page content
@@ -113,6 +114,7 @@ assets may also be put in the `overrides` directory:
113114
│ ├─ nav.html # Main navigation
114115
│ ├─ nav-item.html # Main navigation item
115116
│ ├─ pagination.html # Pagination (used for blog)
117+
│ ├─ palette.html # Color palette toggle
116118
│ ├─ post.html # Blog post excerpt
117119
│ ├─ search.html # Search interface
118120
│ ├─ social.html # Social links

docs/reference/annotations.md

+42-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,51 @@ See additional configuration options:
3131
[Markdown in HTML]: ../setup/extensions/python-markdown.md#markdown-in-html
3232
[SuperFences]: ../setup/extensions/python-markdown-extensions.md#superfences
3333
34+
### Annotation icons
35+
36+
[:octicons-tag-24: 9.2.0][Annotation icons support]
37+
38+
The annotation icon can be changed to any icon bundled with the theme, or even
39+
a [custom icon], e.g. to material/arrow-right-circle:. Simply add the following
40+
lines to `mkdocs.yml`:
41+
42+
``` yaml
43+
theme:
44+
icon:
45+
annotation: material/arrow-right-circle # (1)!
46+
```
47+
48+
1. Enter a few keywords to find the perfect icon using our [icon search] and
49+
click on the shortcode to copy it to your clipboard:
50+
51+
<div class="mdx-iconsearch" data-mdx-component="iconsearch">
52+
<input class="md-input md-input--stretch mdx-iconsearch__input" placeholder="Search icon" data-mdx-component="iconsearch-query" value="material circle" />
53+
<div class="mdx-iconsearch-result" data-mdx-component="iconsearch-result" data-mdx-mode="file">
54+
<div class="mdx-iconsearch-result__meta"></div>
55+
<ol class="mdx-iconsearch-result__list"></ol>
56+
</div>
57+
</div>
58+
59+
Some popular choices:
60+
61+
- :material-plus-circle: - `material/plus-circle`
62+
- :material-circle-medium: - `material/circle-medium`
63+
- :material-record-circle: - `material/record-circle`
64+
- :material-arrow-right-circle: - `material/arrow-right-circle`
65+
- :material-arrow-right-circle-outline: - `material/arrow-right-circle-outline`
66+
- :material-chevron-right-circle: - `material/chevron-right-circle`
67+
- :material-star-four-points-circle: - `material/star-four-points-circle`
68+
- :material-plus-circle-outline: - `material/plus-circle-outline`
69+
70+
[Annotation icons support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.2.0
71+
[custom icon]: ../setup/changing-the-logo-and-icons.md#additional-icons
72+
[icon search]: icons-emojis.md#search
73+
3474
## Usage
3575

3676
### Using annotations
3777

38-
[:octicons-tag-24: 9.2.0b0][Annotation support] ·
78+
[:octicons-tag-24: 9.2.0][Annotation support] ·
3979
:octicons-beaker-24: Experimental
4080

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

67-
[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
68108

69109
#### in annotations
70110

docs/reference/images.md

+15
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ but it's always possible to use the [Markdown in HTML] extension with literal
136136
</figure>
137137
</div>
138138

139+
140+
Another option is to use [Markdown captions](https://github.com/Evidlo/markdown_captions) extension
141+
which converts images with alt text to \<figure\> with \<figcaption\>.
142+
143+
``` html title="Image with caption"
144+
![Image caption](https://dummyimage.com/600x400/){ width="300" }
145+
```
146+
147+
<div class="result">
148+
<figure>
149+
<img src="https://dummyimage.com/600x400/f5f5f5/aaaaaa?text=–%20Image%20–" width="300" />
150+
<figcaption>Image caption</figcaption>
151+
</figure>
152+
</div>
153+
139154
### Image lazy-loading
140155

141156
Modern browsers provide [native support for lazy-loading images][lazy-loading]

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/extensions/pymdownx.json

+15
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,21 @@
544544
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#options",
545545
"type": "boolean",
546546
"default": false
547+
},
548+
"url_max_size": {
549+
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#options",
550+
"type": "integer",
551+
"default": 33554432
552+
},
553+
"url_timeout": {
554+
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#options",
555+
"type": "number",
556+
"default": 10.0
557+
},
558+
"url_request_headers": {
559+
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/snippets/#options",
560+
"type": "object",
561+
"default": {}
547562
}
548563
},
549564
"additionalProperties": false

docs/schema/extra.json

+16
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,22 @@
132132
}
133133
]
134134
},
135+
"annotate": {
136+
"title": "Custom selectors for annotations",
137+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#custom-selectors",
138+
"type": "object",
139+
"patternProperties": {
140+
".*": {
141+
"title": "Custom selector",
142+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#custom-selectors",
143+
"type": "array",
144+
"items": {
145+
"type": "string",
146+
"pattern": "^\\.\\w+"
147+
}
148+
}
149+
}
150+
},
135151
"consent": {
136152
"title": "Cookie consent",
137153
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",

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/schema/theme.json

+7
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,13 @@
629629
"content.code.copy"
630630
]
631631
},
632+
{
633+
"title": "Code selection button",
634+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#code-selection-button",
635+
"enum": [
636+
"content.code.select"
637+
]
638+
},
632639
{
633640
"title": "Linked content tabs",
634641
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#linked-content-tabs",

0 commit comments

Comments
 (0)