You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ All notable changes to this project are documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## 1.4.0, 2025-09-21
8
+
* Removed: auto-install of missing pluglet (meaningful error message #262)
9
+
* Fixed: error with yaml dumps (#258)
10
+
* Fixed: detection of Jinja2, to allow title rendering (#266)
11
+
* Small improvements to documentation
12
+
7
13
## 1.3.7, 2024-10-18
8
14
* Fixed: incompatibility with the d2 module (#249)
Copy file name to clipboardExpand all lines: webdoc/docs/pluglets.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,23 +85,28 @@ plugins:
85
85
modules: [mkdocs_macros_foo, mkdocs_macros_bar]
86
86
```
87
87
88
-
### Auto-installable pluglets
88
+
### Finding pluglets
89
89
90
-
**Every pluglet specified in the `modules`list should be available.**
90
+
**Every pluglet specified in the `modules`list should be already installed.**
91
91
92
-
However, if the pluglet cannot be found, mkdocs will attempt to install it
93
-
(with `pip3 install`) from the standard repositories ([Pypi](https://pypi.org/) and others [defined locally](https://pip.pypa.io/en/stable/topics/configuration/#configuration-files)). If not, mkdocs will fail and exit.
92
+
*As of 1.4.0*
94
93
95
-
!!! Tip "Make installations easier!"
96
-
The purpose of this feature is to facilitate the management of environments with several mkdocs websites, typically when a pluglet is designed for a whole
97
-
company, project, etc.
94
+
!!! Tip "No more auto-install of pluglets"
95
+
However, if a pluglet cannot be found, mkdocs will no longer attempt to install it
96
+
(with `pip3 install`) from the standard repositories ([Pypi](https://pypi.org/) and others [defined locally](https://pip.pypa.io/en/stable/topics/configuration/#configuration-files)).
98
97
99
-
In this way, the macros and filters declared in the pluglet will work out
100
-
of the box, as long as the pluglet is properly defined in the config file
101
-
(and the pluglet is auto-installable).
98
+
If a plugin is available on Pypi and it was not installed, `mkdocs serve` and `mkdocs build` will fail
99
+
with a ModuleNotFound exception and a meaningful message, making debugging easier on a new install:
102
100
101
+
```
102
+
Could not import pluglet 'mkdocs_macros_foo'. Please install it from Pypi:
103
+
104
+
pip install mkdocs_macros_foo
105
+
```
103
106
104
-
In some cases, the name of the source package i:
107
+
If the plugin name is different from the Python import name, you _should_ specify it
108
+
in the `modules` parameter so that MkDocs-Macros can check for its existence on Pypi,
109
+
in case it is not installed.
105
110
106
111
```{.yaml}
107
112
plugins:
@@ -113,7 +118,7 @@ plugins:
113
118
In the example above `mkdocs-macros-test` is the package source, and
114
119
`mkdocs_macros_test` is the package name for the `import` statement.
115
120
116
-
If those names are correct everything should fall into place when you type the `mkdocs serve` or `mkdocs build`commands.
121
+
If those names are correct, the `mkdocs serve` or `mkdocs build`will give the correct error message.
0 commit comments