From 7521377ebaa6b62129a2e1c70cde7da7f399e031 Mon Sep 17 00:00:00 2001 From: Philipp Temminghoff Date: Sun, 17 Sep 2023 20:50:58 +0200 Subject: [PATCH] chore: docs --- mknodes/basenodes/mkcodeimage.py | 2 +- mknodes/basenodes/mkiframe.py | 2 +- mknodes/basenodes/mkkeys.py | 2 +- mknodes/basenodes/mklink.py | 2 +- mknodes/basenodes/mkprogressbar.py | 2 +- mknodes/basenodes/mktabcontainer.py | 2 ++ mknodes/basenodes/mktasklist.py | 4 ++-- mknodes/navs/mknav.py | 6 +++++- mknodes/templatenodes/mkinstallguide.py | 2 +- mknodes/templatenodes/mkpluginflow.py | 2 +- 10 files changed, 16 insertions(+), 10 deletions(-) diff --git a/mknodes/basenodes/mkcodeimage.py b/mknodes/basenodes/mkcodeimage.py index eda3bf97..37bdeede 100644 --- a/mknodes/basenodes/mkcodeimage.py +++ b/mknodes/basenodes/mkcodeimage.py @@ -15,7 +15,7 @@ class MkCodeImage(mknode.MkNode): - """Class representing a Code block.""" + """Node to display a code block as an SVG image.""" ICON = "material/code-json" diff --git a/mknodes/basenodes/mkiframe.py b/mknodes/basenodes/mkiframe.py index bfc95855..020239b9 100644 --- a/mknodes/basenodes/mkiframe.py +++ b/mknodes/basenodes/mkiframe.py @@ -10,7 +10,7 @@ class MkIFrame(mknode.MkNode): - """Node for showing a formatted list.""" + """Node for embedding an IFrame.""" ICON = "material/web-box" diff --git a/mknodes/basenodes/mkkeys.py b/mknodes/basenodes/mkkeys.py index 03a14bfe..48beb6ea 100644 --- a/mknodes/basenodes/mkkeys.py +++ b/mknodes/basenodes/mkkeys.py @@ -10,7 +10,7 @@ class MkKeys(mknode.MkNode): - """Node to include other MkPages / Md files.""" + """Node to display Keyboard shortcuts.""" REQUIRED_EXTENSIONS = ["pymdownx.keys"] ICON = "fontawesome/regular/keyboard" diff --git a/mknodes/basenodes/mklink.py b/mknodes/basenodes/mklink.py index b7adfe3b..d9815b4d 100644 --- a/mknodes/basenodes/mklink.py +++ b/mknodes/basenodes/mklink.py @@ -16,7 +16,7 @@ class MkLink(mknode.MkNode): - """A simple Link.""" + """A simple Link (with optional icon and option to show up as a button).""" ICON = "octicons/link-24" REQUIRED_EXTENSIONS = ["attr_list"] # for buttons diff --git a/mknodes/basenodes/mkprogressbar.py b/mknodes/basenodes/mkprogressbar.py index 871d930c..c115f93e 100644 --- a/mknodes/basenodes/mkprogressbar.py +++ b/mknodes/basenodes/mkprogressbar.py @@ -10,7 +10,7 @@ class MkProgressBar(mknode.MkNode): - """Node to include other MkPages / Md files.""" + """Node to display a CSS-based progress bar.""" REQUIRED_EXTENSIONS = ["pymdownx.progressbar"] ICON = "fontawesome/solid/bars-progress" diff --git a/mknodes/basenodes/mktabcontainer.py b/mknodes/basenodes/mktabcontainer.py index 232eeeab..802bc924 100644 --- a/mknodes/basenodes/mktabcontainer.py +++ b/mknodes/basenodes/mktabcontainer.py @@ -11,6 +11,8 @@ class MkTabContainer(mkcontainer.MkContainer): + """Base class for nodes containing tabs.""" + items: list[mktabs.MkTab | mktabs.MkTabBlock] Tab: type[mktabs.MkTab | mktabs.MkTabBlock] ICON = "material/tab" diff --git a/mknodes/basenodes/mktasklist.py b/mknodes/basenodes/mktasklist.py index 456f39a7..6adb5d82 100644 --- a/mknodes/basenodes/mktasklist.py +++ b/mknodes/basenodes/mktasklist.py @@ -10,7 +10,7 @@ class MkTask(mkcontainer.MkContainer): - """Node for a single definition.""" + """Node for a single task listitem.""" REQUIRED_EXTENSIONS = ["pymdownx.tasklist"] ICON = "material/library" @@ -43,7 +43,7 @@ def _to_markdown(self) -> str: class MkTaskList(mkcontainer.MkContainer): - """Node for definition lists.""" + """Node for task lists.""" REQUIRED_EXTENSIONS = ["pymdownx.tasklist"] ICON = "material/library" diff --git a/mknodes/navs/mknav.py b/mknodes/navs/mknav.py index c090bc8e..925afd35 100644 --- a/mknodes/navs/mknav.py +++ b/mknodes/navs/mknav.py @@ -26,7 +26,7 @@ class MkNav(mknode.MkNode): A nav is named (exception is the root nav, which has section name = None), has an associated virtual file (in general a SUMMARY.md), - an optional index page and can contain other navs as well as pages. + an optional index page and can contain other navs as well as pages and links. """ ICON = "material/navigation-outline" @@ -49,9 +49,13 @@ def __init__( self.section = section # helpers.slugify(section) self.filename = filename self.nav = navigation.Navigation() + """Navigation object containing all child items.""" self.route = navrouter.NavRouter(self) + """Router used for decorator routing.""" self.parse = navparser.NavParser(self) + """Parser object used to build Navs from different data / directory structures.""" self.metadata = metadata.Metadata() + """Page Metadata, in form of a dataclass.""" super().__init__(**kwargs) def __repr__(self): diff --git a/mknodes/templatenodes/mkinstallguide.py b/mknodes/templatenodes/mkinstallguide.py index 6628a3fc..e6511484 100644 --- a/mknodes/templatenodes/mkinstallguide.py +++ b/mknodes/templatenodes/mkinstallguide.py @@ -11,7 +11,7 @@ class MkInstallGuide(mkcontainer.MkContainer): - """Node to display an install guide (currently PyPi only).""" + """Node to display an install guide.""" ICON = "material/help" diff --git a/mknodes/templatenodes/mkpluginflow.py b/mknodes/templatenodes/mkpluginflow.py index 59bdc360..b9784449 100644 --- a/mknodes/templatenodes/mkpluginflow.py +++ b/mknodes/templatenodes/mkpluginflow.py @@ -22,7 +22,7 @@ class MkPluginFlow(mkcontainer.MkContainer): - """Text node containing Instructions to set up a dev environment.""" + """Node showing info about the different stages of an MkDocs plugin.""" ICON = "material/dev-to" STATUS = "new"