Skip to content

Commit 986db8a

Browse files
committed
Warn when this plugin is being used from the mkdocs executable
And prevent possible future versions of MkDocs. As described in ProperDocs/properdocs#33
1 parent 44e0bca commit 986db8a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

mkdocs_redirects/plugin.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
from mkdocs.plugins import BasePlugin
1313
from mkdocs.structure.files import File
1414

15+
try:
16+
import properdocs.replacement_warning
17+
18+
# Warn when this plugin is being used from the mkdocs executable.
19+
properdocs.replacement_warning.setup()
20+
except ImportError:
21+
pass
22+
23+
1524
log = logging.getLogger("mkdocs.plugin.redirects")
1625

1726

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ classifiers = [
3434
dynamic = ["version"]
3535
requires-python = ">=3.10"
3636
dependencies = [
37-
"mkdocs >=1.2",
37+
"mkdocs >=1.2, <=1.6.1",
38+
"properdocs >=1.6.5",
3839
#min "jinja2 >=2.10.2",
3940
#min "markupsafe >=2.0.1",
4041
]

0 commit comments

Comments
 (0)