Browse Source

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

Fix liquid tag that was broken due to change in pelican
Alexis Metaireau 11 years ago
parent
commit
24b1332753
2 changed files with 8 additions and 7 deletions
  1. 2 2
      liquid_tags/Readme.md
  2. 6 5
      liquid_tags/liquid_tags.py

+ 2 - 2
liquid_tags/Readme.md

@@ -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

+ 6 - 5
liquid_tags/liquid_tags.py

@@ -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)