Written in Livemark
(2021-10-27 09:56)

Writing a Plugin

Start quickly with Livemark Plugin Github Template

Overview

Livemark provides a plugin interface to help write new plugins. There are 4 main hooks a plugin author can use to alter the rendering process. All of them take an corresponding object that can be updated:

Example

This plugin simply adds a string to H1 tags on every page in the project:

from livemark import Plugin


class CustomPlugin(Plugin):
    identity = "custom"

    # Process

    def process_markup(self, markup):
        markup.add_markup("<span>(template)<span>", target="h1")

References

To help you write a plugin, explore core plugins, architecture, and API References:

Data presentation framework for Python that generates static sites from extended Markdown with interactive charts, tables, scripts, and other features