lektor-custom-render-template/lektor_render_template.py

13 lines
379 B
Python
Raw Normal View History

2023-02-05 01:10:09 +01:00
# -*- coding: utf-8 -*-
from lektor.pluginsystem import Plugin
class RenderTemplatePlugin(Plugin):
name = 'lektor_render_template'
description = u'Add your description here.'
def on_process_template_context(self, context, **extra):
def test_function():
return 'Value from plugin %s' % self.name
context['test_function'] = test_function