Skip to content

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):
    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': {},
                               'attr_list': {},
                               'md_in_html': {},
                               'pymdownx.details': {},
                               'pymdownx.emoji': {'emoji_generator': <function to_svg at 0x7fd7a6931800>,
                                                  'emoji_index': <function twemoji at 0x7fd7a69316c0>},
                               'pymdownx.magiclink': {'repo': 'mknodes',
                                                      'repo_url_shorthand': True,
                                                      'user': 'phil65'},
                               'pymdownx.superfences': {}},
          plugins=[],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mknodes/mknodes/mknodes/manual/page_section.py
  source_function: null
  source_line_no: 34
hide:
- toc
status: new
template: SUMMARY.html
title: Adding to MkPages

[^1]: Super cool, right?