cli
Class info¶
🛈 DocStrings¶
MkDocs-MkNodes CLI interface.
build
¶
build(
repo_path: str = Option(None, *REPO_CMDS, help=REPO_HELP, show_default=False),
build_fn: str = Option(None, *BUILD_CMS, help=BUILD_HELP, show_default=False),
site_dir: str = Option("site", *SITE_DIR_CMDS, help=SITE_DIR_HELP),
clone_depth: int = Option(None, *DEPTH_CMDS, help=DEPTH_HELP, show_default=False),
config_path: str = Option(CFG_DEFAULT, *CFG_PATH_CMDS, help=CFG_PATH_HELP),
theme: str = Option("material", *THEME_CMDS, help=THEME_HELP),
strict: bool = Option(False, *STRICT_CMDS, help=STRICT_HELP),
use_directory_urls: bool = Option(True, *USE_DIR_URLS_CMDS, help=USE_DIR_URLS_HELP),
_verbose: bool = Option(False, *VERBOSE_CMDS, help=VERBOSE_HELP, callback=verbose),
_quiet: bool = Option(False, *QUIET_CMDS, help=QUIET_HELP, callback=quiet),
)
Create a MkNodes-based website, locally or remotely.
Runs the build script on given repository (either locally or a hosted one), adapts the config file automatically and creates the HTML website in given site dir.
Further info here: https://phil65.github.io/mkdocs-mknodes/CLI/
Source code in mkdocs_mknodes/cli/__init__.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
create_config
¶
create_config(
repo_path: str = Option(None, *REPO_CMDS, help=REPO_HELP, show_default=False),
build_fn: str = Option(None, *BUILD_CMS, help=BUILD_HELP, show_default=False),
theme: str = Option("material", *THEME_CMDS, help=THEME_HELP),
use_directory_urls: bool = Option(True, *USE_DIR_URLS_CMDS, help=USE_DIR_URLS_HELP),
_verbose: bool = Option(False, *VERBOSE_CMDS, help=VERBOSE_HELP, callback=verbose),
_quiet: bool = Option(False, *QUIET_CMDS, help=QUIET_HELP, callback=quiet),
)
Create a config based on a given build setup.
Runs the build script on given repository (either locally or a hosted one), infers the required resources (CSS / JS / Md extensions) as well as metadata and creates a MkDocs config file.
Further info here: https://phil65.github.io/mkdocs-mknodes/CLI/
Source code in mkdocs_mknodes/cli/__init__.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
serve
¶
serve(
repo_path: str = Option(None, *REPO_CMDS, help=REPO_HELP, show_default=False),
build_fn: str = Option(None, *BUILD_CMS, help=BUILD_HELP, show_default=False),
clone_depth: int = Option(None, *DEPTH_CMDS, help=DEPTH_HELP, show_default=False),
config_path: str = Option(CFG_DEFAULT, *CFG_PATH_CMDS, help=CFG_PATH_HELP),
strict: bool = Option(False, *STRICT_CMDS, help=STRICT_HELP),
theme: str = Option("material", *THEME_CMDS, help=THEME_HELP),
use_directory_urls: bool = Option(True, *USE_DIR_URLS_CMDS, help=USE_DIR_URLS_HELP),
_verbose: bool = Option(False, *VERBOSE_CMDS, help=VERBOSE_HELP, callback=verbose),
_quiet: bool = Option(False, *QUIET_CMDS, help=QUIET_HELP, callback=quiet),
)
Serve a MkNodes-based website, locally or remotely.
Runs the build script on given repository (either locally or a hosted one), adapts the config file automatically and serves a webpage on http://127.0.0.1/8000/.
Further info here: https://phil65.github.io/mkdocs-mknodes/CLI/
Source code in mkdocs_mknodes/cli/__init__.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|