Merge pull request #70 from talha131/fix-liquid-tag-issue-n-doc

Fix liquid tag that was broken due to change in pelican
This commit is contained in:
Alexis Metaireau
2013-09-01 04:49:06 -07:00
2 changed files with 8 additions and 7 deletions

View File

@@ -20,9 +20,9 @@ There are several options available
## Image Tag
To insert a sized and labeled image in your document, enable the
``liquid_tags.video`` plugin and use the following:
``liquid_tags.img`` plugin and use the following:
{% img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}
{% img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}
## Video Tag

View File

@@ -1,15 +1,16 @@
from pelican import signals
from mdx_liquid_tags import LiquidTags
from pelican.readers import EXTENSIONS
def addLiquidTags(gen):
if not gen.settings.get('MD_EXTENSIONS'):
MDReader = EXTENSIONS['markdown']
gen.settings['MD_EXTENSIONS'] = MDReader.default_extensions
from pelican.settings import DEFAULT_CONFIG
gen.settings['MD_EXTENSIONS'] = DEFAULT_CONFIG['MD_EXTENSIONS']
if LiquidTags not in gen.settings['MD_EXTENSIONS']:
configs = dict(settings=gen.settings)
gen.settings['MD_EXTENSIONS'].append(LiquidTags(configs))
def register():
signals.initialized.connect(addLiquidTags)