Switched warning message to print to stderr

This commit is contained in:
squidfunk
2026-02-20 12:03:41 +01:00
parent b78109b36b
commit 70dee38366
2 changed files with 26 additions and 18 deletions

View File

@@ -19,16 +19,20 @@
# IN THE SOFTWARE.
from os import getenv
from sys import stderr
from colorama import Fore, Style
# Silence this warning with NO_MKDOCS_2_WARNING=1
if not getenv("NO_MKDOCS_2_WARNING"):
print("")
print(f"{Fore.RED} │ ⚠ WARNING MkDocs 2.0 is incompatible with Material for MkDocs{Style.RESET_ALL}")
print(f"{Fore.RED}{Style.RESET_ALL}")
print(f"{Fore.RED}{Style.RESET_ALL} MkDocs 1.x is unmaintained. We recommend switching to Zensical, our")
print(f"{Fore.RED}{Style.RESET_ALL} new static site generator, as soon as possible. We're providing an")
print(f"{Fore.RED}{Style.RESET_ALL} analysis of the situation in this article:")
print(f"{Fore.RED}{Style.RESET_ALL} ")
print(f"{Fore.RED}{Style.RESET_ALL} \033[4mhttps://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/{Style.RESET_ALL}")
print(f"{Style.RESET_ALL}")
print(
"\n"
f"{Fore.RED}⚠ WARNING MkDocs 2.0 is incompatible with Material for MkDocs{Style.RESET_ALL}\n"
f"{Fore.RED}{Style.RESET_ALL}\n"
f"{Fore.RED}{Style.RESET_ALL} MkDocs 1.x is unmaintained. We recommend switching to Zensical, our\n"
f"{Fore.RED}{Style.RESET_ALL} new static site generator, as soon as possible. We're providing an\n"
f"{Fore.RED}{Style.RESET_ALL} analysis of the situation in this article:\n"
f"{Fore.RED}{Style.RESET_ALL} \n"
f"{Fore.RED}{Style.RESET_ALL} \033[4mhttps://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/{Style.RESET_ALL}\n"
f"{Style.RESET_ALL}",
file=stderr
)

View File

@@ -19,16 +19,20 @@
# IN THE SOFTWARE.
from os import getenv
from sys import stderr
from colorama import Fore, Style
# Silence this warning with NO_MKDOCS_2_WARNING=1
if not getenv("NO_MKDOCS_2_WARNING"):
print("")
print(f"{Fore.RED} │ ⚠ WARNING MkDocs 2.0 is incompatible with Material for MkDocs{Style.RESET_ALL}")
print(f"{Fore.RED}{Style.RESET_ALL}")
print(f"{Fore.RED}{Style.RESET_ALL} MkDocs 1.x is unmaintained. We recommend switching to Zensical, our")
print(f"{Fore.RED}{Style.RESET_ALL} new static site generator, as soon as possible. We're providing an")
print(f"{Fore.RED}{Style.RESET_ALL} analysis of the situation in this article:")
print(f"{Fore.RED}{Style.RESET_ALL} ")
print(f"{Fore.RED}{Style.RESET_ALL} \033[4mhttps://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/{Style.RESET_ALL}")
print(f"{Style.RESET_ALL}")
print(
"\n"
f"{Fore.RED}⚠ WARNING MkDocs 2.0 is incompatible with Material for MkDocs{Style.RESET_ALL}\n"
f"{Fore.RED}{Style.RESET_ALL}\n"
f"{Fore.RED}{Style.RESET_ALL} MkDocs 1.x is unmaintained. We recommend switching to Zensical, our\n"
f"{Fore.RED}{Style.RESET_ALL} new static site generator, as soon as possible. We're providing an\n"
f"{Fore.RED}{Style.RESET_ALL} analysis of the situation in this article:\n"
f"{Fore.RED}{Style.RESET_ALL} \n"
f"{Fore.RED}{Style.RESET_ALL} \033[4mhttps://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/{Style.RESET_ALL}\n"
f"{Style.RESET_ALL}",
file=stderr
)