markdown-meta-init (meta, record)

Future versions of Lektor may change its Markdown parser away from Mistune, and the various markdown related event hooks may be completely removed or work differently if that happens.

This event is emitted before the markdown meta information is set. This can be used to add custom meta variables to the markdown object.

Example

lektor-markdown-header-anchors uses this to initialize a meta var as an empty list:

def on_markdown_meta_init(self, meta, **extra):
    meta['toc'] = []

Plugins That Use This Event

Comments