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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user