import plugins from core and restructure repo

This commit is contained in:
Deniz Turgut
2013-04-10 19:12:31 -04:00
parent 66e83158ba
commit 9e70c17839
135 changed files with 2628 additions and 204 deletions

View File

@@ -0,0 +1,6 @@
Global license
--------------
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.

View File

@@ -0,0 +1 @@
from .global_license import *

View File

@@ -0,0 +1,18 @@
"""
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_generate_context.connect(add_license)