forked from varia/varia.website
many many many Varia's websites, work in progress: https://many.vvvvvvaria.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
562 B
19 lines
562 B
7 years ago
|
"""
|
||
|
License plugin for Pelican
|
||
|
==========================
|
||
|
|
||
|
This plugin allows you to define a LICENSE setting and adds the contents of that
|
||
|
license variable to the article's context, making that variable available to use
|
||
|
from within your theme's templates.
|
||
|
"""
|
||
|
|
||
|
from pelican import signals
|
||
|
|
||
|
def add_license(generator, metadata):
|
||
|
if 'license' not in metadata.keys()\
|
||
|
and 'LICENSE' in generator.settings.keys():
|
||
|
metadata['license'] = generator.settings['LICENSE']
|
||
|
|
||
|
def register():
|
||
|
signals.article_generator_context.connect(add_license)
|