2222import sys
2323
2424from colorama import Fore , Style
25+ from importlib .util import find_spec
2526from pathlib import Path
2627from sys import stderr
2728
@@ -35,23 +36,29 @@ def is_mkdocs():
3536
3637# Check if we're running MkDocs and the warning hasn't been disabled
3738if is_mkdocs () and not os .getenv ("NO_MKDOCS_2_WARNING" ):
39+ properdocs_notice = ""
40+ if (
41+ os .getenv ("DISABLE_MKDOCS_2_WARNING" , "" ).lower () != "true"
42+ and find_spec ("properdocs" ) is not None
43+ ):
44+ properdocs_notice = (
45+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } \n "
46+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } A third-party plugin may print a separate notice recommending\n "
47+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } ProperDocs. That notice is not from the Material for MkDocs\n "
48+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } team and does not represent a recommendation from us.\n "
49+ )
50+
3851 print (
3952 "\n "
40- f"{ Fore .RED } │ ⚠ Warning from the Material for MkDocs team{ Style .RESET_ALL } \n "
41- f"{ Fore .RED } │{ Style .RESET_ALL } \n "
42- f"{ Fore .RED } │{ Style .RESET_ALL } MkDocs 2.0, the underlying framework of Material for MkDocs,\n "
43- f"{ Fore .RED } │{ Style .RESET_ALL } will introduce backward-incompatible changes, including:\n "
44- f"{ Fore .RED } │{ Style .RESET_ALL } \n "
45- f"{ Fore .RED } │ × { Style .RESET_ALL } All plugins will stop working – the plugin system has been removed\n "
46- f"{ Fore .RED } │ × { Style .RESET_ALL } All theme overrides will break – the theming system has been rewritten\n "
47- f"{ Fore .RED } │ × { Style .RESET_ALL } No migration path exists – existing projects cannot be upgraded\n "
48- f"{ Fore .RED } │ × { Style .RESET_ALL } Closed contribution model – community members can't report bugs\n "
49- f"{ Fore .RED } │ × { Style .RESET_ALL } Currently unlicensed – unsuitable for production use\n "
50- f"{ Fore .RED } │{ Style .RESET_ALL } \n "
51- f"{ Fore .RED } │{ Style .RESET_ALL } Our full analysis:\n "
52- f"{ Fore .RED } │{ Style .RESET_ALL } \n "
53- f"{ Fore .RED } │{ Style .RESET_ALL } \033 [4mhttps://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/{ Style .RESET_ALL } \n "
54- f"{ Style .RESET_ALL } " ,
53+ f"{ Fore .YELLOW } │ { Style .BRIGHT } Material for MkDocs reaches end of life on May 5, 2027.{ Style .RESET_ALL } \n "
54+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } Critical fixes and security updates continue until that date.\n "
55+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } \n "
56+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } Zensical is its maintained successor, built by the same team.\n "
57+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } Try it alongside MkDocs with your existing mkdocs.yml:\n "
58+ f"{ Fore .YELLOW } │{ Style .RESET_ALL } { Fore .CYAN } \033 [4mhttps://zensical.org/docs/compatibility/mkdocs/migration/{ Style .RESET_ALL } \n "
59+ f"{ properdocs_notice } "
60+ "\n "
61+ f"{ Fore .LIGHTBLACK_EX } To disable this warning, set NO_MKDOCS_2_WARNING=1.{ Style .RESET_ALL } \n " ,
5562 file = stderr
5663 )
5764
0 commit comments