【问题标题】:Jekyll Liquid tags not being replacedJekyll Liquid 标签没有被替换
【发布时间】:2020-09-27 20:39:44
【问题描述】:

我在我的网站的.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 liquid


    【解决方案1】:

    我相信 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 上的右括号。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-21
      • 1970-01-01
      • 2020-10-02
      • 2012-02-29
      • 2017-02-12
      • 1970-01-01
      • 2015-11-09
      相关资源
      最近更新 更多