Adding to MkPages
Info
You can add other MkNodes to a page sequentially.
Adding strings also works, they get converted to MkText nodes.
...and text starting with # will become a MkHeader.
Every MkPage has a MkFootNotes node built-in[^1].
Page info
Code for this page
| mknodes.manual.page_section._ |
|---|
| @nav.route.page("Adding to MkPages", hide="toc", status="new")
def _(page: mk.MkPage) -> None:
page += mk.MkAdmonition("You can add other MkNodes to a page sequentially.")
page += "Adding strings also works, they get converted to MkText nodes."
page += "### ...and text starting with # will become a MkHeader."
page += "Every MkPage has a MkFootNotes node built-in[^1]."
page.footnotes[1] = "Super cool, right?"
|
Resources
Resources(css=[],
markdown_extensions={'admonition': {},
'pymdownx.details': {},
'pymdownx.superfences': {}},
plugins=[],
js=[],
assets=[],
packages=[])
Metadata
created:
source_filename: /home/runner/work/mknodes/mknodes/.venv/lib/python3.13/site-packages/anyenv/async_run.py
source_function: run_sync.<locals>.wrapper
source_line_no: 52
hide:
- toc
status: new
title: Adding to MkPages
[^1]:
Super cool, right?