diff --git a/liquid_tags/include_code.py b/liquid_tags/include_code.py index e8eddc0..389f364 100644 --- a/liquid_tags/include_code.py +++ b/liquid_tags/include_code.py @@ -69,7 +69,8 @@ def include_code(preprocessor, tag, markup): else: title = os.path.basename(src) - url = '/{0}/{1}/{2}'.format('static', code_dir, src) + static_dir = settings.get('STATIC_OUT_DIR', 'static') + url = '/{0}/{1}/{2}'.format(static_dir, code_dir, src) open_tag = ("
\n
{title} " "download
".format(title=title, diff --git a/liquid_tags/notebook.py b/liquid_tags/notebook.py index 2d27751..846294d 100644 --- a/liquid_tags/notebook.py +++ b/liquid_tags/notebook.py @@ -174,7 +174,6 @@ def notebook(preprocessor, tag, markup): settings = preprocessor.configs.config['settings'] nb_dir = settings.get('NOTEBOOK_DIR', 'notebooks') nb_path = os.path.join('content', nb_dir, src) - url = '/{0}/{1}/{2}'.format('static', nb_dir, src) if not os.path.exists(nb_path): raise ValueError("File {0} could not be found".format(nb_path))