[Assets] Template is processed before static files are available
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
Were you able to solve it? I'm getting the same issue when trying to use i18n_subsites and assets together
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.
Ok I did the same thing but... grooosss.
@khardix / @murbard: Would you consider submitting a PR to address the issue(s) discussed here?
@justinmayer I will take a look at it. However, as I work on my pelican setup highly irregularly, it may take a while.
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.