mkdocs ¤
Callable for MkDocs.
Functions:
-
build
–Build the MkDocs documentation.
-
gh_deploy
–Deploy your documentation to GitHub Pages.
-
new
–Create a new MkDocs project.
-
run
–Run
mkdocs
. -
serve
–Run the builtin development server.
build ¤
build(
*,
config_file: str | None = None,
clean: bool | None = None,
strict: bool | None = None,
theme: str | None = None,
directory_urls: bool | None = None,
site_dir: str | None = None,
quiet: bool = False,
verbose: bool = False
) -> None
Build the MkDocs documentation.
Parameters:
-
config_file
(str | None
, default:None
) –Provide a specific MkDocs config.
-
clean
(bool | None
, default:None
) –Remove old files from the site_dir before building (the default).
-
strict
(bool | None
, default:None
) –Enable strict mode. This will cause MkDocs to abort the build on any warnings.
-
theme
(str | None
, default:None
) –The theme to use when building your documentation.
-
directory_urls
(bool | None
, default:None
) –Use directory URLs when building pages (the default).
-
site_dir
(str | None
, default:None
) –The directory to output the result of the documentation build.
-
quiet
(bool
, default:False
) –Silence warnings.
-
verbose
(bool
, default:False
) –Enable verbose output.
Source code in src/duty/callables/mkdocs.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
gh_deploy ¤
gh_deploy(
*,
config_file: str | None = None,
clean: bool | None = None,
message: str | None = None,
remote_branch: str | None = None,
remote_name: str | None = None,
force: bool | None = None,
no_history: bool | None = None,
ignore_version: bool | None = None,
shell: bool | None = None,
strict: bool | None = None,
theme: str | None = None,
directory_urls: bool | None = None,
site_dir: str | None = None,
quiet: bool = False,
verbose: bool = False
) -> None
Deploy your documentation to GitHub Pages.
Parameters:
-
config_file
(str | None
, default:None
) –Provide a specific MkDocs config.
-
clean
(bool | None
, default:None
) –Remove old files from the site_dir before building (the default).
-
message
(str | None
, default:None
) –A commit message to use when committing to the GitHub Pages remote branch. Commit {sha} and MkDocs {version} are available as expansions.
-
remote_branch
(str | None
, default:None
) –The remote branch to commit to for GitHub Pages. This overrides the value specified in config.
-
remote_name
(str | None
, default:None
) –The remote name to commit to for GitHub Pages. This overrides the value specified in config
-
force
(bool | None
, default:None
) –Force the push to the repository.
-
no_history
(bool | None
, default:None
) –Replace the whole Git history with one new commit.
-
ignore_version
(bool | None
, default:None
) –Ignore check that build is not being deployed with an older version of MkDocs.
-
shell
(bool | None
, default:None
) –Use the shell when invoking Git.
-
strict
(bool | None
, default:None
) –Enable strict mode. This will cause MkDocs to abort the build on any warnings.
-
theme
(str | None
, default:None
) –The theme to use when building your documentation.
-
directory_urls
(bool | None
, default:None
) –Use directory URLs when building pages (the default).
-
site_dir
(str | None
, default:None
) –The directory to output the result of the documentation build.
-
quiet
(bool
, default:False
) –Silence warnings.
-
verbose
(bool
, default:False
) –Enable verbose output.
Source code in src/duty/callables/mkdocs.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 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 129 130 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 |
|
new ¤
Create a new MkDocs project.
Parameters:
-
project_directory
(str
) –Where to create the project.
-
quiet
(bool
, default:False
) –Silence warnings.
-
verbose
(bool
, default:False
) –Enable verbose output.
Source code in src/duty/callables/mkdocs.py
176 177 178 179 180 181 182 183 184 185 |
|
run ¤
Run mkdocs
.
Parameters:
-
*args
(str
, default:()
) –CLI arguments.
-
quiet
(bool
, default:False
) –Silence warnings.
-
verbose
(bool
, default:False
) –Enable verbose output.
Source code in src/duty/callables/mkdocs.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
serve ¤
serve(
*,
config_file: str | None = None,
dev_addr: str | None = None,
livereload: bool | None = None,
dirtyreload: bool | None = None,
watch_theme: bool | None = None,
watch: list[str] | None = None,
strict: bool | None = None,
theme: str | None = None,
directory_urls: bool | None = None,
quiet: bool = False,
verbose: bool = False
) -> None
Run the builtin development server.
Parameters:
-
config_file
(str | None
, default:None
) –Provide a specific MkDocs config.
-
dev_addr
(str | None
, default:None
) –IP address and port to serve documentation locally (default: localhost:8000).
-
livereload
(bool | None
, default:None
) –Enable/disable the live reloading in the development server.
-
dirtyreload
(bool | None
, default:None
) –nable the live reloading in the development server, but only re-build files that have changed.
-
watch_theme
(bool | None
, default:None
) –Include the theme in list of files to watch for live reloading. Ignored when live reload is not used.
-
watch
(list[str] | None
, default:None
) –Directories or files to watch for live reloading.
-
strict
(bool | None
, default:None
) –Enable strict mode. This will cause MkDocs to abort the build on any warnings.
-
theme
(str | None
, default:None
) –The theme to use when building your documentation.
-
directory_urls
(bool | None
, default:None
) –Use directory URLs when building pages (the default).
-
quiet
(bool
, default:False
) –Silence warnings.
-
verbose
(bool
, default:False
) –Enable verbose output.
Source code in src/duty/callables/mkdocs.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
|