Browse Source

Merge pull request #72 from talha131/fix-liquid-tags-include_code

Remove legacy code in liquid tags include_code plugin
Justin Mayer 11 years ago
parent
commit
506f265214
1 changed files with 2 additions and 4 deletions
  1. 2 4
      liquid_tags/include_code.py

+ 2 - 4
liquid_tags/include_code.py

@@ -18,7 +18,7 @@ Example
 -------
 {% include_code myscript.py %}
 
-This will import myscript.py from content/downloads/code/myscript.py
+This will import myscript.py from content/code/myscript.py
 and output the contents in a syntax highlighted code block inside a figure,
 with a figcaption listing the file name and download link.
 
@@ -69,9 +69,7 @@ def include_code(preprocessor, tag, markup):
     else:
         title = os.path.basename(src)
 
-    static_dir = settings.get('STATIC_OUT_DIR', 'static')
-
-    url = '/{0}/{1}/{2}'.format(static_dir, code_dir, src)
+    url = '/{0}/{1}'.format(code_dir, src)
     url = re.sub('/+', '/', url)
 
     open_tag = ("<figure class='code'>\n<figcaption><span>{title}</span> "