Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Assets] Template is processed before static files are available #773

Open
khardix opened this issue Sep 6, 2016 · 6 comments
Open

[Assets] Template is processed before static files are available #773

khardix opened this issue Sep 6, 2016 · 6 comments

Comments

@khardix
Copy link

khardix commented Sep 6, 2016

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 khardix changed the title [Assets] Template is processed before static files are avaiable [Assets] Template is processed before static files are available Sep 6, 2016
@murbard
Copy link

murbard commented Feb 7, 2017

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

@khardix
Copy link
Author

khardix commented Feb 7, 2017

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.

@murbard
Copy link

murbard commented Feb 7, 2017

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

@justinmayer
Copy link
Member

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

@khardix
Copy link
Author

khardix commented Mar 23, 2018

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

@kdeldycke
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants