Jekyll 杰基尔液体标签未被更换
我的网站的Jekyll 杰基尔液体标签未被更换,jekyll,liquid,Jekyll,Liquid,我的网站的.css文件中有以下内容,但当我尝试生成网站时,会出现完全相同的情况。也就是说,液体标签没有被替换,但下面的内容被视为纯文本。我该如何解决这个问题 @font-face{ font-family: 'Examplefont'; src: url({{ '/css/ef/eot/Examplefont-Light.eot'); src: local('Examplefont Sans Light'), url({{ '/css/ef/eot/Ex
.css
文件中有以下内容,但当我尝试生成网站时,会出现完全相同的情况。也就是说,液体标签没有被替换,但下面的内容被视为纯文本。我该如何解决这个问题
@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;
}
我相信Jekyll只处理具有前置内容的文件中的液体,但您可以将其添加到空文件中:
---
---
@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;
}
顺便说一句,您的第一行src
上也缺少了收尾大括号