1
0
Fork 0
forked from github/pelican

Remove the dependency to pkgutil for the plugins

This commit is contained in:
Alexis Metaireau 2011-06-17 23:37:08 +02:00
commit c5a63c953a
9 changed files with 84 additions and 89 deletions

View file

@ -1,23 +0,0 @@
from blinker import signal
"""
License plugin for Pelican
==========================
Simply add license variable in article's context, which contain
the license text.
Settings:
---------
Add LICENSE to your settings file to define default license.
"""
def add_license(generator, metadatas):
if 'license' not in metadatas.keys()\
and 'LICENSE' in generator.settings.keys():
metadatas['license'] = generator.settings['LICENSE']
signal('pelican_article_generate_context').connect(add_license)