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;
}
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.