feat(cli,mkdocs): require site_name, fix nav paths, and echo serve URL
- Require `--site-name` when generating mkdocs.yml to ensure valid configs - Inject site_name explicitly into generated mkdocs.yml - Echo MkDocs serve URL (http://127.0.0.1:8000) before starting server - Fix MkDocs nav emission to correctly resolve docs-relative paths - Align MkDocs-related optional dependencies with a compatible, pinned set These changes make MkDocs generation valid by default, improve UX when serving, and prevent nav path and plugin compatibility issues.
This commit is contained in:
@@ -133,6 +133,12 @@ def serve(mkdocs_yml: Path) -> None:
|
||||
raise click.ClickException(f"mkdocs.yml not found: {mkdocs_yml}")
|
||||
|
||||
from mkdocs.commands.serve import serve as mkdocs_serve
|
||||
|
||||
host = "127.0.0.1"
|
||||
port = 8000
|
||||
url = f"http://{host}:{port}/"
|
||||
|
||||
click.echo(f"Serving documentation at {url}")
|
||||
mkdocs_serve(config_file=str(mkdocs_yml))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user