The asset_url needs to use also theme_static_dir

Sorry for this mistake, I was using harcoded paths in my template.

If the destination changes in the output folder (`THEME_STATIC_DIR`) also the URL used for the assets should change.
This commit is contained in:
Javier Gonel
2013-11-14 18:41:33 +02:00
parent 507443b3b2
commit e00e7d35c9

View File

@@ -38,10 +38,10 @@ def add_jinja2_ext(pelican):
def create_assets_env(generator):
"""Define the assets environment and pass it to the generator."""
assets_url = 'theme/'
theme_static_dir = generator.settings['THEME_STATIC_DIR']
assets_src = os.path.join(generator.output_path, theme_static_dir)
generator.env.assets_environment = Environment(assets_src, assets_url)
generator.env.assets_environment = Environment(
assets_src, theme_static_dir)
if 'ASSET_CONFIG' in generator.settings:
for item in generator.settings['ASSET_CONFIG']: