【问题标题】:Jekyll Conversion Error With Bourbon波旁威士忌的 Jekyll 转换错误
【发布时间】:2017-10-30 07:50:44
【问题描述】:

每当我尝试bundle exec jekyll build/serve 时,我都会收到以下错误:

 Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/main.scss':
                    Undefined variable: "$output-bourbon-deprecation-warnings". on line 20
jekyll 3.6.0 | Error:  Undefined variable: "$output-bourbon-deprecation-warnings". on line 20

我什至不知道去哪里找,因为这个变量没有出现在 css/main.scss 文件中。

css/main.scss 文件的代码:

---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
@import "variables";

// TOOLS
@import "reset";
@import "normalize";
@import "bourbon/bourbon";
@import "neat/neat";

// GLOBAL
@import "base";
@import "layout";

// COMPONENTS
@import "header";
@import "footer";
@import "carousel";
@import "post-index";

// PAGE
@import "posts";

// CUSTOM
@import "custom";

我相信它的主要用途是作为前缀。当我尝试完全注释掉波旁威士忌时,我会遇到更多错误。我也尝试删除然后重新安装 gems。

【问题讨论】:

  • 您使用什么主题以及如何将 bourbon 集成到您的 Jekyll 安装中?
  • 我没有安装主题,但现在的任务是推送博客更新。没有关于它是如何制作的文档,但这是我可以从文件中收集到的:我们使用Slick 组件作为轮播,以及一个名为 Neat 的程序用于网格。所有 gem 都使用 gitbash 安装到我们的保管箱中,这是我们推送到服务器的地方。这些文件最初是在 Mac 上创建的,而我在 PC Windows 10 上。我们在 boubon-> css3 下的唯一文件是 _calc.scss。在主 bourbon 文件夹中,我们有一个带有 @import 信息的 bourbon.scss。
  • 请提供一些代码。存储库 url 更好。

标签: css sass jekyll bourbon


【解决方案1】:

根据您使用的原始主题配置的正确程度,这可能是由于 gemfile 没有被锁定得足够紧,以至于它允许进行重大更改。

将以下内容添加到您的 SCSS 文件中:

$output-bourbon-deprecation-warnings: false;

这必须添加之前 @import boutbon;

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-04-03
  • 2019-06-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多