Using Liquid in Rails Assets

I use Liquid in my CSS. For example, I have test.css.liquidone that contains:

body { background: {{ 'red' }}; }

When I run rake assets:precompile, it is not test.cssthat compiled, but still test.css.liquid, and the Liquid code is not parsed.

Asterisks use Tilt, which by default has a Liquid analyzer. I have Fluid enabled on my site.

Any idea what could be wrong?

+5
source share
1 answer

It is a bad idea to rename a manifest file application.css. You can include assets by requiring them in the manifest file, for example:

*= require your_styles

and if you started the engine liquid, it should be fine.

+1
source

All Articles