forked from github/pelican
Remove the dependency to pkgutil for the plugins
This commit is contained in:
parent
7184484488
commit
c5a63c953a
9 changed files with 84 additions and 89 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue