pelican-plugins icon indicating copy to clipboard operation
pelican-plugins copied to clipboard

[Assets] Template is processed before static files are available

Open khardix opened this issue 9 years ago • 6 comments

I'm using the assets plugin to convert my .scss files to CSS. The conversion is done pretty much as described in the README:

{% assets filters="pyscss", output="css/screen.css", "scss/screen.scss" %}
<link rel="stylesheet" type="text/css" href="{{SITEURL}}/{{ASSET_URL}}">
{% endassets %}

However, when generating the site with clean/nonexistent output directory, I'm getting BundleError:

$ make clean html
CRITICAL: BundleError: '.../output/theme/scss/screen.scss' does not exist

After poking around, I think that the issue is that the Jinja generation runs before the static files are available in the output directory, and thus webassets cannot find the sources and refuses to run.

Pelican version: 3.6.3

khardix avatar Sep 06 '16 19:09 khardix

Were you able to solve it? I'm getting the same issue when trying to use i18n_subsites and assets together

murbard avatar Feb 07 '17 08:02 murbard

Well, not exactly, but I worked around it by manually (modified command in Makefile) copying the latest assets to the output directory before running the build. It is not perfect, but it works for now.

khardix avatar Feb 07 '17 09:02 khardix

Ok I did the same thing but... grooosss.

murbard avatar Feb 07 '17 17:02 murbard

@khardix / @murbard: Would you consider submitting a PR to address the issue(s) discussed here?

justinmayer avatar Mar 23 '18 10:03 justinmayer

@justinmayer I will take a look at it. However, as I work on my pelican setup highly irregularly, it may take a while.

khardix avatar Mar 23 '18 10:03 khardix

The legacy assets plugin has been moved to a new dedicated repository at: https://github.com/pelican-plugins/webassets .

Please report there if you're still impacted by the issue. In the mean time, I guess this can be closed.

kdeldycke avatar Dec 10 '20 13:12 kdeldycke