Skip to content
Myr

🔧 Upgrade Material for MkDocs and remove insiders (#1416)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent ec0166e · Browse files · 9 files+17 added−44 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+17 added−44 removed

  • other:+17 added−44 removed

9 files+17 added−44 removed

modified:.github/workflows/build-docs.yml+1 added-9 removed
modified:scripts/docs.py+1 added-15 removed
1import logging2import os3import re4import subprocess5from functools import lru_cache5from http.server import HTTPServer, SimpleHTTPRequestHandler7from importlib import metadata6from pathlib import Path78import typer9
4 unmodified lines
1415app = typer.Typer()161720@lru_cache21def is_mkdocs_insiders() -> bool:22 version = metadata.version("mkdocs-material")23 return "insiders" in version242518@app.callback()19def callback() -> None:28 if is_mkdocs_insiders():29 os.environ["INSIDERS_FILE"] = "./mkdocs.insiders.yml"30 # For MacOS with insiders and Cairo20 # For MacOS with Cairo21 os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib"222324def generate_readme_content() -> str:
64 unmodified lines
89def build() -> None:90 """91 Build the docs.92 """103 insiders_env_file = os.environ.get("INSIDERS_FILE")104 print(f"Insiders file {insiders_env_file}")105 if is_mkdocs_insiders():106 print("Using insiders")93 print("Building docs")94 subprocess.run(["mkdocs", "build"], check=True)95 typer.secho("Successfully built docs", color=typer.colors.GREEN)96
25 unmodified lines
added:mkdocs.env.yml+5 added
deleted:mkdocs.insiders.yml-7 removed
deleted:mkdocs.maybe-insiders.yml-6 removed
deleted:mkdocs.no-insiders.yml
modified:mkdocs.yml+7 added-1 removed
1INHERIT: ./mkdocs.maybe-insiders.yml1INHERIT: ./mkdocs.env.yml2site_name: Typer3site_description: Typer, build great CLIs. Easy to code. Based on Python type hints.4site_url: https://typer.tiangolo.com/5
52 unmodified lines
58plugins:59 # Material for MkDocs60 search:61 social:62 typeset:63 # Other plugins64 macros:65 include_yaml:66 - members: data/members.yml
81 unmodified lines
148 - management.md149 - release-notes.md150151markdown_extensions:152 # Material for MkDocs Extensions153 material.extensions.preview:154 targets:155 include:156 - "*"157 # Python Markdown158 abbr:159 attr_list:160 footnotes:
68 unmodified lines
deleted:requirements-docs-insiders.txt-3 removed
1git+https://${TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git@9.5.30-insiders-4.53.112git+https://${TOKEN}@github.com/pawamoy-insiders/griffe-typing-deprecated.git3git+https://${TOKEN}@github.com/pawamoy-insiders/mkdocstrings-python.git
modified:requirements-docs.txt+3 added-3 removed
8 unmodified lines
9# For image processing by Material for MkDocs10pillow==11.3.011# For image processing by Material for MkDocs12cairosvg==2.8.213# mkdocstrings[python]==0.25.114# Enable griffe-typingdoc once dropping Python 3.7 and upgrading typing-extensions15# griffe-typingdoc==0.2.513mkdocstrings[python]==0.30.114griffe-typingdoc==0.3.015griffe-warnings-deprecated==1.1.016# For griffe, it formats with black17# black==24.3.018mkdocs-macros-plugin==1.5.019markdown-include-variants==0.0.5