fix on_setup_env callback function naming (#342)
Fix typos: on_env_setup -> on_setup_env Thank you, @relikd
This commit is contained in:
parent
51002aee91
commit
f5327b786d
|
@ -22,7 +22,7 @@ from lektor.context import get_ctx
|
||||||
|
|
||||||
class MyPlugin(Plugin):
|
class MyPlugin(Plugin):
|
||||||
|
|
||||||
def on_env_setup(self, **extra):
|
def on_setup_env(self, **extra):
|
||||||
color = self.get_config().get('color')
|
color = self.get_config().get('color')
|
||||||
def get_css(artifact_name='/static/demo.css'):
|
def get_css(artifact_name='/static/demo.css'):
|
||||||
ctx = get_ctx()
|
ctx = get_ctx()
|
||||||
|
|
|
@ -19,7 +19,7 @@ from lektor.pluginsystem import Plugin
|
||||||
|
|
||||||
class MyPlugin(Plugin):
|
class MyPlugin(Plugin):
|
||||||
|
|
||||||
def on_env_setup(self, **extra):
|
def on_setup_env(self, **extra):
|
||||||
self.emit('setup', foo=42)
|
self.emit('setup', foo=42)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ from lektor.pluginsystem import Plugin
|
||||||
|
|
||||||
class MyPlugin(Plugin):
|
class MyPlugin(Plugin):
|
||||||
|
|
||||||
def on_env_setup(self, **extra):
|
def on_setup_env(self, **extra):
|
||||||
color = self.get_config().get('color')
|
color = self.get_config().get('color')
|
||||||
self.env.jinja_env.globals['my_color'] = color
|
self.env.jinja_env.globals['my_color'] = color
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue