Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Oct 1, 2023
1 parent 1da7531 commit 559a1e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mknodes/basenodes/mktimeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
link: str = "",
button_text: str = "More",
image: str = "",
**kwargs,
**kwargs: Any,
):
"""Constructor.
Expand Down Expand Up @@ -151,7 +151,7 @@ def add_item(
link: str = "",
button_text: str = "More",
image: str = "",
**kwargs,
**kwargs: Any,
):
"""Add a timeline item.
Expand Down
3 changes: 3 additions & 0 deletions mknodes/manual/page_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ def create_page_section(root_nav: mk.MkNav):
root_nav += nav
page = nav.add_index_page()
page += mk.MkJinjaTemplate("mkpage_index.jinja")
page.footnotes[1] = r"Footnotes are numbered, can be set via \__setitem__."
page.footnotes[2] = r"They can also get nested[^3]."
page.footnotes[3] = mk.MkAdmonition("They can also contain other Markdown (nodes).")
page.created_by = create_page_section


Expand Down
4 changes: 2 additions & 2 deletions mknodes/resources/mkpage_index.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MkPages can get created in many ways:
Like many other nodes, MkPages inherits from [MkContainer][mknodes.MkContainer] and looks to the outside world like a list, meaning you can add nodes to them by using `+=`, [MkPage.append][mknodes.MkPage.append] or [MkPage.insert][mknodes.MkPage.insert]


Each MkPage also has an [MkFootnotes][mknodes.MkFootNotes] node "embedded" which can be used to easily add footnotes to a page.
Each MkPage also has an [MkFootnotes][mknodes.MkFootNotes] node "embedded" which can be used to easily add footnotes to a page. (Scroll to the bottom to see the result)

``` py title="MkFootnotes embedded"
page = MkPage("My page")
Expand All @@ -90,7 +90,7 @@ During the build process, all Markdown nodes which are part of an [MkPage][mknod


The final URL of an [MkPage][mknodes.MkPage] is determined by its position inside the tree and gets calculated
when the tree gets "serialized" into markdown. The HTML filename is inferred from the Page
when the tree gets "serialized" into markdown. The HTML filename is inferred from the page
title in case no specific path is given.


Expand Down

0 comments on commit 559a1e3

Please sign in to comment.