gpt4 book ai didi

css - jekyll GitHub 用户页面构建错误

转载 作者:行者123 更新时间:2023-12-03 11:55:33 25 4
gpt4 key购买 nike

我正在尝试在 GitHub Pages 上托管博客使用 Jekyll .我能够毫无问题地在本地运行博客。我正在使用 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

页面构建失败,出现以下错误:

The file blog/css/main.scss contains syntax errors. For more information, see https://help.github.com/articles/page-build-failed-markdown-errors.

If you have any questions please contact us at 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 生成的。不过我不确定。这里有什么问题?

最佳答案

您需要指定一个_sass 目录。查看我的元素,它有一个 main.scss(位于 css/main.scss)文件,它从 _sass 目录导入部分 --> https://github.com/wiredsister/wiredsister.github.io

关于css - jekyll GitHub 用户页面构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27138835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com