Populate GENERATOR in a plugin
parent
87f31cbb8b
commit
607f74690e
@ -0,0 +1,13 @@
|
||||
import pelican
|
||||
|
||||
class PelicanVersionGenerator(pelican.generators.Generator):
|
||||
def generate_context(self):
|
||||
version = f"Pelican {pelican.__version__}"
|
||||
self.context['GENERATOR'] = version
|
||||
|
||||
|
||||
def get_generators(_peli):
|
||||
return PelicanVersionGenerator
|
||||
|
||||
def register():
|
||||
pelican.signals.get_generators.connect(get_generators)
|
Loading…
Reference in New Issue