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:
@@ -9,6 +9,11 @@ def _load_template(template: Optional[Path]) -> Dict[str, Any]:
|
||||
|
||||
|
||||
@click.command("mkdocs")
|
||||
@click.option(
|
||||
"--site-name",
|
||||
required=True,
|
||||
help="MkDocs site_name (required)",
|
||||
)
|
||||
@click.option(
|
||||
"--docs-dir",
|
||||
type=click.Path(path_type=Path),
|
||||
@@ -35,5 +40,6 @@ def mkdocs_cmd(
|
||||
nav_file: Path,
|
||||
template: Optional[Path],
|
||||
out: Path,
|
||||
site_name: str,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user