Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Adding to MkPages

Note

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-in1.

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={},
          plugins=[],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mknodes/mknodes/src/mknodes/manual/page_section.py
  source_function: _
  source_line_no: 34
hide:
- toc
status: new
title: Adding to MkPages


  1. Super cool, right? ↩