Selaa lähdekoodia

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.
Javier Gonel 11 vuotta sitten
vanhempi
commit
e00e7d35c9
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      assets/assets.py

+ 2 - 2
assets/assets.py

@@ -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']: