Skip to content

Commit 3a35274

Browse files
committed
Prepare 9.3.0 release
1 parent 2e85464 commit 3a35274

File tree

8 files changed

+105
-48
lines changed

8 files changed

+105
-48
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
mkdocs-material-9.3.0 (2023-09-11)
2+
3+
* Improved configuration sharing between community and Insiders edition
4+
* Added built-in group plugin for enabling plugins conditionally
5+
* Added new settings in tags plugin for enabling/disabling
6+
* Dropped support for Python 3.7 (EOL)
7+
18
mkdocs-material-9.2.8+insiders-4.40.4 (2023-09-04)
29

310
* Fixed privacy plugin choking on boolean HTML5 attributes

docs/changelog/index.md

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

33
## Material for MkDocs
44

5+
### 9.3.0 <small>September 11, 2023</small> { id="9.3.0" }
6+
7+
- Improved configuration sharing between community and Insiders edition
8+
- Added built-in group plugin for enabling plugins conditionally
9+
- Added new settings in tags plugin for enabling/disabling
10+
- Dropped support for Python 3.7 (EOL)
11+
512
### 9.2.8 <small>September 4, 2023</small> { id="9.2.8" }
613

714
- Updated Italian and Russian translations

docs/insiders/getting-started.md

Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -150,65 +150,77 @@ pip install --upgrade git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-materi
150150

151151
[upgrade guide]: ../upgrade.md
152152

153-
## Caveats
153+
## Built-in plugins
154154

155-
This section describes some aspects to consider when using Insiders together
156-
with Material for MkDocs to ensure that users without access to Insiders can
157-
still build your documentation.
155+
When you're using built-in plugins that are solely available via Insiders,
156+
outside contributors won't be able to build your documentation project on their
157+
local machine. This is the reason why we developed the [built-in group plugin]
158+
that allows to conditionally load plugins.
158159

159-
### Built-in plugins
160+
[^1]:
161+
Previously we recommended to use [configuration inheritance] to work around
162+
this limitations, but the brand new [built-in group plugin] is a much better
163+
approach, as it allows you to use a single configuration file for building
164+
your project with the community edition and Insiders version of Material
165+
for MkDocs.
160166

161-
When using built-in plugins that are solely available via Insiders, it might be
162-
necessary to split the `mkdocs.yml` configuration into a base configuration, and
163-
one with plugin overrides. Note that this is a limitation of MkDocs, which can
164-
be mitigated by using [configuration inheritance]:
167+
[built-in group plugin]: #built-in-group-plugin
168+
[configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance
165169

166-
=== ":octicons-file-code-16: `mkdocs.insiders.yml`"
170+
### Built-in group plugin
167171

168-
``` yaml
169-
INHERIT: mkdocs.yml
170-
plugins:
171-
- search
172-
- social
173-
- tags
174-
```
172+
[:octicons-tag-24: 9.3.0][Group plugin support] ·
173+
:octicons-cpu-24: Plugin ·
174+
:octicons-beaker-24: Experimental
175175

176-
=== ":octicons-file-code-16: `mkdocs.yml`"
176+
The built-in group plugin adds support for conditionally loading plugins based
177+
on environments. This makes enabling and disabling of multiple plugins much
178+
simpler, as you can group them into logical units and enable or disable them
179+
with an [environment variable]:
177180

178-
``` yaml
179-
# Configuration with everything except Insiders plugins
180-
```
181+
``` yaml
182+
plugins:
183+
- group:
184+
enabled: !ENV CI
185+
plugins:
186+
- optimize
187+
- minify
188+
```
181189
182-
Now, when you're in an environment with access to Insiders (e.g. in your CI
183-
pipeline), you can build your documentation project with the following lines:
190+
[`enabled`](#+group.enabled){ #+group.enabled }
184191

185-
```
186-
mkdocs build --config-file mkdocs.insiders.yml
187-
```
192+
: :octicons-milestone-24: Default: `false` – This option specifies whether
193+
the plugin is enabled when building your project. By default, the plugin is
194+
disabled, so you can use an [environment variable]:
188195

189-
!!! tip "Sharing plugin and extension configuration"
196+
``` yaml
197+
plugins:
198+
- group:
199+
enabled: !ENV CI
200+
```
190201

191-
If you want to share `plugins` or `markdown_extensions` between both
192-
configuration files `mkdocs.insiders.yml` and `mkdocs.yml`, you can use
193-
the alternative key-value syntax in both files. The above example would
194-
then look like:
202+
Now, If you invoke MkDocs with that environment variable (or export the
203+
environment variable before invoking MkDocs), the plugin will be enabled:
195204

196-
=== ":octicons-file-code-16: `mkdocs.insiders.yml`"
205+
``` sh
206+
CI=true mkdocs build
207+
```
197208

198-
``` yaml
199-
INHERIT: mkdocs.yml
200-
plugins:
201-
social: {}
202-
```
209+
[`plugins`](#+group.plugins){ #+group.plugins }
203210

204-
=== ":octicons-file-code-16: `mkdocs.yml`"
211+
: :octicons-milestone-24: Default: _none_ – This option specifies the plugins
212+
that the group plugin should load when enabled. Note that the plugins must
213+
be specified as a list, even if there's only one plugin:
205214

206-
``` yaml
207-
# Additional configuration above
208-
plugins:
209-
search: {}
210-
tags: {}
211-
```
215+
``` yaml
216+
plugins:
217+
- group:
218+
plugins:
219+
- optimize
220+
- minify
221+
```
212222

223+
The syntax is exactly the same as for all other plugins.
213224

214-
[configuration inheritance]: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance
225+
[Group plugin support]: https://github.com/squidfunk/mkdocs-material/releases/tag/9.3.0
226+
[environment variable]: https://www.mkdocs.org/user-guide/configuration/#environment-variables

docs/schema/plugins.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
{
2626
"$ref": "plugins/blog.json"
2727
},
28+
{
29+
"$ref": "plugins/group.json"
30+
},
2831
{
2932
"$ref": "plugins/info.json"
3033
},

docs/schema/plugins/group.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-07/schema",
3+
"title": "Built-in group plugin",
4+
"oneOf": [
5+
{
6+
"type": "object",
7+
"properties": {
8+
"group": {
9+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/insiders/getting-started/#built-in-group-plugin",
10+
"type": "object",
11+
"properties": {
12+
"enabled": {
13+
"title": "Enable plugin",
14+
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/insiders/getting-started/#+group.enabled",
15+
"type": "boolean",
16+
"default": true
17+
},
18+
"plugins": {
19+
"$ref": "../plugins.json"
20+
}
21+
},
22+
"additionalProperties": false
23+
}
24+
},
25+
"additionalProperties": false
26+
}
27+
]
28+
}

material/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.2.8">
35+
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.3.0">
3636
{% endblock %}
3737
{% block htmltitle %}
3838
{% if page.meta and page.meta.title %}

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.2.8",
3+
"version": "9.3.0",
44
"description": "Documentation that simply works",
55
"keywords": [
66
"mkdocs",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dynamic = [
3737
"keywords"
3838
]
3939
readme = "README.md"
40-
requires-python = ">=3.7"
40+
requires-python = ">=3.8"
4141
classifiers = [
4242
"Development Status :: 5 - Production/Stable",
4343
"Environment :: Web Environment",

0 commit comments

Comments
 (0)