zensical
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| IconResolver mkdocs_mknodes.writers.zensical Make icons used by pages / social links available to the theme. |
||
| ZensicalWriter mkdocs_mknodes.writers.zensical Write a `BuildOutput` as Zensical input: docs folder + generated config. |
š DocStrings¶
Writer producing a Zensical project (Markdown pages + a generated mkdocs.yml-style config).
Zensical has no plugin API, so the generated pages are written into the docs folder and a
generated config (mkdocs.generated.yml by default) INHERITs the project's mkdocs.yml
and adds the nav, the required Markdown extensions, extra CSS / JS and site metadata.
Build with zensical build -f mkdocs.generated.yml (or mkdocs-mknodes build).
IconResolver
¶
Make icons used by pages / social links available to the theme.
MkNodes uses Iconify keys (grommet-icons:install). Icons available in the theme's
bundled icon sets get mapped to theme paths (material/wrench), all others get
downloaded into the theme override folder (.icons/iconify/<set>/<name>.svg).
Source code in mkdocs_mknodes/writers/zensical.py
svgs
instance-attribute
¶
Template path (.icons/...svg) -> SVG of icons to add to the theme.
resolve
¶
Return the theme icon path for given icon (None if it is not available).
update_page
¶
Replace the icon of the page front matter with a theme icon path.
Source code in mkdocs_mknodes/writers/zensical.py
ZensicalWriter
¶
Bases: Writer
Write a BuildOutput as Zensical input: docs folder + generated config.
Source code in mkdocs_mknodes/writers/zensical.py
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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
build_config
¶
build_config(
output: BuildOutput,
*,
templates_dir: str | None = None,
social: list[dict[str, str]] | None = None
) -> dict[str, Any]
Return the generated config (to be layered over the source config).
Source code in mkdocs_mknodes/writers/zensical.py
merge_markdown_extensions
¶
Merge required extensions into the configured ones and return a config list.
Source code in mkdocs_mknodes/writers/zensical.py
merge_values
¶
Deep-merge update into base: dicts recursively, lists without duplicates.
Source code in mkdocs_mknodes/writers/zensical.py
social_to_config
¶
to_iconify_key
¶
Convert a theme icon path (material/wrench) to an Iconify key (mdi:wrench).
Source code in mkdocs_mknodes/writers/zensical.py
to_theme_icon
¶
Convert an Iconify key (fa-brands:github) to a theme icon path.
Icons already in theme format (fontawesome/brands/github) are returned unchanged,
unknown icon sets return None.