我正试图使用GitHub页面在杰基尔上托管一个博客。我能够在本地运行这个博客,没有麻烦。我正在使用username.github.io/username存储库。我使用以下命令创建了新的博客:
git clone https://github.com/xxx/xxx.github.io.git
jekyll new blog
cd blog
jekyll serve这在当地是可行的。然后,我使用以下命令提交并推送到git:
cd ..
git add *
git commit -m "testing"
git push页面生成失败,出现以下错误:
文件
blog/css/main.scss包含语法错误。有关更多信息,请参见https://help.github.com/articles/page-build-failed-markdown-errors。 如果您有任何问题,请联系我们在https://github.com/contact。
main.scss如下所示,
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
// Our variables
$base-font-family: Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Using media queries with like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
// Import partials from `sass_dir` (defaults to `_sass`)
@import
"base",
"layout",
"syntax-highlighting"
;我认为问题是css不是由scss产生的。不过,我不太确定。这里有什么问题?
发布于 2015-11-18 02:02:44
您需要指定一个_sass目录。查看我的项目,它有一个main.scss (位于css/main.scss中)文件,该文件从_sass目录-> https://github.com/wiredsister/wiredsister.github.io目录导入部分
https://stackoverflow.com/questions/27138835
复制相似问题