Reputation: 606
I have the below in a .css
file for my website, yet the exact same thing is showing up when I try to generate the site. That is the Liquid tags are not being replaced but the below is being treated like plaintext. How would I fix this?
@font-face{
font-family: 'Examplefont';
src: url({{ '/css/ef/eot/Examplefont-Light.eot');
src: local('Examplefont Sans Light'),
url({{ '/css/ef/eot/Examplefont-Light.eot' | absolute_url }} format('embedded-opentype'),
url({{ '/css/ef/woff/Examplefont-Light.woff' | absolute_url }} format('woff'),
url({{ '/css/ef/ttf/Examplefont-Light.ttf' | absolute_url }} format('truetype');
font-weight: 200;
font-style: normal;
}
Upvotes: 1
Views: 68
Reputation: 2861
I believe Jekyll only processes liquid in files that have front matter, but you can just add it in empty:
---
---
@font-face{
font-family: 'Examplefont';
src: url({{ '/css/ef/eot/Examplefont-Light.eot' | absolute_url }});
src: local('Examplefont Sans Light'),
url({{ '/css/ef/eot/Examplefont-Light.eot' | absolute_url }} format('embedded-opentype'),
url({{ '/css/ef/woff/Examplefont-Light.woff' | absolute_url }} format('woff'),
url({{ '/css/ef/ttf/Examplefont-Light.ttf' | absolute_url }} format('truetype');
font-weight: 200;
font-style: normal;
}
By the way, you're also missing the closing end braces on your first src
line.
Upvotes: 1