mknodesconfig
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
MkNodesConfig mkdocs_mknodes.plugin.mknodesconfig |
🛈 DocStrings¶
The Mkdocs Plugin.
MkNodesConfig
¶
Bases: MkDocsConfig
Source code in mkdocs_mknodes/plugin/mknodesconfig.py
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 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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
auto_delete_generated_templates
class-attribute
instance-attribute
¶
auto_delete_generated_templates = Type(bool, default=True)
Delete the generated HTML templates when build is finished.
MkNodes may generate HTML template overrides during the build process and deletes them after build. Using this setting, the deletion can be prevented.
build_fn
class-attribute
instance-attribute
¶
build_fn = Type(str, default='mkdocs_mknodes:parse')
Path to the build script / callable.
Possible formats:
my.module:Class.build_fn
(must be a classmethod / staticmethod)my.module:build_fn
path/to/file.py:build_fn
Can also be remote. The targeted callable gets the project instance as an argument and optionally keyword arguments from setting below.
build_folder
class-attribute
instance-attribute
¶
build_folder = Optional(Type(str))
Folder to create the Markdown files in.
If no folder is set, MkNodes will generate a temporary dir.
build_kwargs
class-attribute
instance-attribute
¶
build_kwargs = Optional(Type(dict))
Keyword arguments passed to the build script / callable.
Build scripts may have keyword arguments. You can set them by using this setting.
clone_depth
class-attribute
instance-attribute
¶
clone_depth = Type(int, default=100)
Clone depth in case the repository is remote. (Required for git-changelog
).
global_resources
class-attribute
instance-attribute
¶
global_resources = Type(bool, default=True)
Make resources globally available.
If True, then the resources inferred from the nodes will be put into all HTML pages. (This reflects the "default" MkDocs mechanism of putting extra CSS / JS into the config file) If False, then MkNodes will put the CSS / JS only into the pages which need it. (the resources will be moved into the appropriate page template blocks)
render_by_default
class-attribute
instance-attribute
¶
render_by_default = Type(bool, default=True)
Render all pages in the jinja environment.
This allows to render jinja in the MkNodes environment outside of the MkJinja
nodes.
This setting can be overridden by setting the page metadata field "render_macros".
repo_path
class-attribute
instance-attribute
¶
repo_path = Type(str, default='.')
Path to the repository to create a website for. (http://....my_project.git
)
rewrite_theme_templates
class-attribute
instance-attribute
¶
rewrite_theme_templates = Type(bool, default=True)
Add additional functionality to themes by rewriting template files.
MkNodes can rewrite the HTML templates of Themes in order to add additional functionality.
Right now, enabling this feature allows these options for the Material-MkDocs theme: - use iconify icons instead of the Material-MkDocs icons - setting the theme features "navigation.indexes" and "navigation.expand" via page metadata.
show_page_info
class-attribute
instance-attribute
¶
show_page_info = Type(bool, default=False)
Append an admonition box with build-related information.
If True, all pages get added an expandable admonition box at the bottom,
containing information about the created page.
This includes:
- Metadata
- Resources
- Code which created the page (needs the page to be created via decorators, or
the generated_by
attribute of the MkPage
needs to be set manually)