You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
323 B
Python
14 lines
323 B
Python
3 years ago
|
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)
|