diff --git a/docs/docs/template-api.rst b/docs/docs/template-api.rst index bc7ea16..5682ca1 100644 --- a/docs/docs/template-api.rst +++ b/docs/docs/template-api.rst @@ -26,7 +26,15 @@ Templates The template library is humble but growing. Feel free to share your ideas for templates on the project page -or `Discord `_. Otherwise, +or `Discord `_. If you'd +like to help create templates, the interface is +available for subclassing. Your templates can either +be included directly in snakemd, or you're free +to create your own template library by importing +snakemd. In the former case, the template should +make use of the Python standard library only and not +make use of any external dependencies. In the latter +case, that restriction does not apply. With that said, the existing templates can be found below. TableOfContents diff --git a/docs/version-history.rst b/docs/version-history.rst index 55a8708..7e53bab 100644 --- a/docs/version-history.rst +++ b/docs/version-history.rst @@ -13,6 +13,21 @@ as follows: v2.x ---- +* v2.2.0b1 [:pr:`#140`, :pr:`#142`, :pr:`#143`, :pr:`#144`, :pr:`#145`, :pr:`#146`, :pr:`#149`] + + * Expanded the Element requirements to include :code:`__repr__()` for developer friendly strings + * Reworked logging system to take advantage of lazy loading and new :code:`__repr__()` methods + * Expanded testing to verify the :code:`__repr__()` strings can be used as Python code + * Added a handful of getter methods to dissuade folks from using protected members of classes + * Fixed jQuery issues in documentation + * Incorporated linting (specifically pylint) in development workflow + * Updated changelog string for consistency on PyPI + * Introduced concept of lazy loading for templates to allow for processing of document contents at render time + * Broke existing behavior of a handful of utilities: + + * Changed the :code:`dir` parameter to :code:`directory` for :code:`dump()` method of :code:`Document` to eliminate shadowing of built-in :code:`dir` + * Removed :code:`doc` parameter of :code:`TableOfContents` constructor in preference of new lazy loading system of templates + * v2.1.0 [:pr:`136`] * Migrated build system from setup.py to poetry diff --git a/pyproject.toml b/pyproject.toml index 63884bd..14b3716 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ [tool.poetry] name = "SnakeMD" description = "A markdown generation library for Python." -version = "2.1.0" +version = "2.2.0b1" license = "MIT" authors = [ diff --git a/snakemd/__init__.py b/snakemd/__init__.py index 233f103..7926f72 100644 --- a/snakemd/__init__.py +++ b/snakemd/__init__.py @@ -2,9 +2,9 @@ The SnakeMD module is the root module of the snakemd system. It imports all classes to be used directly through snakemd, so users don't need to know -the underlying directory structure. Likewise, +the underlying directory structure. Likewise, directory structure can be changed in future iterations -of the project without affecting users. +of the project without affecting users. """ from .document import * diff --git a/snakemd/templates.py b/snakemd/templates.py index 98b315a..2addf6d 100644 --- a/snakemd/templates.py +++ b/snakemd/templates.py @@ -52,7 +52,7 @@ def load(self, elements: list[Element]) -> None: class TableOfContents(Template): """ - A Table of Contents is an block containing an ordered list + A Table of Contents is an element containing an ordered list of all the `

` headings in the document by default. A range can be specified to customize which headings (e.g., `

`) are included in the table of contents. This element can be placed anywhere in the document.