get_config (fresh=False)

This loads the config of the plugin as an Ini File.

Dotted paths are used to navigate into sections. So get('foo.bar') would navigate to the bar key in the [foo] section.

Example

from lektor.pluginsystem import Plugin


class MyPlugin(Plugin):

    def on_env_setup(self, **extra):
        color = self.get_config().get('color')
        self.env.jinja_env.globals['my_color'] = color

Comments