我是法国人,抱歉我的英语不好,我对 Jekyll 有疑问
我安装了 gems:jekyll、jekyll-sass-converter
但 Jekyll 不会将 styles.scss 转换为 styles.css
I declared the styles on _includes/head.html:
<!-- CSS -->
<link rel="stylesheet" href="{{ site.baseurl }}css/styles.css">
Assets 已在 _config.yml 上声明:
sass:
sass_dir: _lib
style: compressed
styles.scss 输出
// Imports
@import "base";
@import "main";
_lib文件夹输出
/base.scss
/main.scss
Github 元素:https://github.com/micaelandre/micaelandre.github.io
Github 问题:https://github.com/micaelandre/micaelandre.github.io/issues/1
最佳答案
Jekyll 仅在 .scss 以两行三连字符开头的情况下转换 sass 文件,因此在 css/styles.scss
中:
---
---
// Imports
@import "base";
这将生成:css/styles.css
。
另请注意,您无需明确安装 sass 转换器,因为它是 jekyll gem 之一 dependency .
关于css - jekyll-sass-转换器不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43411971/