40 lines
707 B
Python
40 lines
707 B
Python
from pathlib import Path
|
|
from typing import Any, Dict, Optional
|
|
|
|
import click
|
|
|
|
|
|
def _load_template(template: Optional[Path]) -> Dict[str, Any]:
|
|
...
|
|
|
|
|
|
@click.command("mkdocs")
|
|
@click.option(
|
|
"--docs-dir",
|
|
type=click.Path(path_type=Path),
|
|
default=Path("docs"),
|
|
)
|
|
@click.option(
|
|
"--nav",
|
|
"nav_file",
|
|
type=click.Path(path_type=Path),
|
|
default=Path("docforge.nav.yml"),
|
|
)
|
|
@click.option(
|
|
"--template",
|
|
type=click.Path(path_type=Path),
|
|
default=None,
|
|
)
|
|
@click.option(
|
|
"--out",
|
|
type=click.Path(path_type=Path),
|
|
default=Path("mkdocs.yml"),
|
|
)
|
|
def mkdocs_cmd(
|
|
docs_dir: Path,
|
|
nav_file: Path,
|
|
template: Optional[Path],
|
|
out: Path,
|
|
) -> None:
|
|
...
|