导入"波本威士忌"在Jekyll设置中不起作用

Mr.*_*ark 1 ruby gem sass jekyll bourbon

我正在使用Jekyll创建一个静态网站,并希望使用该框架Bourbon来构建我的CSS.

我已经安装了Jekyll并希望通过使用并运行将其添加到我的Gemfile来安装Bourbon.gem 'bourbon'bundle install

现在,当我将规则添加@import 'bourbon';到我的SCSS文件并开始运行Jekyll时,jekyll serve -w它启动了,但是当我修改我的SCSS文件时,Jekyll观察者抛出一个错误说:

    Regenerating: 1 files at 2014-07-03 10:00:11   `Conversion error: There was an error converting 'css/main.scss'.`
...error:
    Error: File to import not found or unreadable: bourbon. Load path: /Users/mark/Code/markdejong.com/mistermark.github.com.jekyll/_sass
    Error: Run jekyll build --trace for more information.
Run Code Online (Sandbox Code Playgroud)

这可能是什么问题?不应该像这样导入它或者杰基尔不支持这个吗?

Luc*_*nan 9

假设你有一个Gemfile:

source 'https://rubygems.org'

gem 'jekyll'

gem 'bourbon'
gem 'neat'
Run Code Online (Sandbox Code Playgroud)

添加此行 _config.yml

gems: [bourbon, neat]
Run Code Online (Sandbox Code Playgroud)

杰基尔将自动要求这些宝石.

只是为了导入:

@import 'bourbon';
@import 'neat';
Run Code Online (Sandbox Code Playgroud)

查看Jekyll文档以获取更多信息 http://jekyllrb.com/docs/plugins/