You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to define a specific css for a single included page in this way
---
layout: default.html
css: page.css.scss
---
My customized page
and in my layout page I'd like to add this custom css like so
<!-- layout style -->
{% css_asset_tag global %}
- /_assets/css/test.css.scss <-- this works correctly
{% endcss_asset_tag %}
<!-- page style -->
/_assets/css/{{ page.css }} <-- this correctly print /_assets/css/page.css.scss
{% if page.css %}
{% css_asset_tag local %}
- /_assets/css/{{ page.css }} <-- this fails
{% endcss_asset_tag %}
{% endif %}
but when I run jekyll I've got an error:
Configuration from /Users/fcalderan/www/root/jekyll/_config.yml
Building site: ./src -> ./static
Asset Pipeline: Processing 'css_asset_tag' manifest 'global'
Configuration from /Users/fcalderan/www/root/jekyll/_config.yml
Configuration from /Users/fcalderan/www/root/jekyll/_config.yml
Asset Pipeline: Saved 'test.css' to '/Users/fcalderan/www/root/jekyll/static/css'
Asset Pipeline: Processing 'css_asset_tag' manifest 'local'
Asset Pipeline: Failed to load assets from provided manifest.
Liquid Exception: Is a directory - /Users/fcalderan/www/root/jekyll/src/_assets/css/ in default
...
I'm not sure but I suppose the interpolation of the string with the css filename is failing inside {% css_asset_tag %} block. There's a way to include a custom style or is it not possible? Or there's a better way to achieve the same result?
Thank you.
The text was updated successfully, but these errors were encountered:
I'm afraid you are right. It looks like the asset manifest is being processed before liquid tags within the manifest. I'm not sure how you can get around this, but let me know if you find a solution. I would be happy to update the lib with your solution or revise the docs to explain a workaround.
I'd like to define a specific css for a single included page in this way
and in my layout page I'd like to add this custom css like so
but when I run jekyll I've got an error:
I'm not sure but I suppose the interpolation of the string with the css filename is failing inside
{% css_asset_tag %}
block. There's a way to include a custom style or is it not possible? Or there's a better way to achieve the same result?Thank you.
The text was updated successfully, but these errors were encountered: