Jekyll custom page build error GitHub

I am trying to host a blog on GitHub pages using Jekyll . I was able to blog locally with no problem. I am using a repository username.github.io/username

. I created a new blog using the following commands:

git clone https://github.com/xxx/xxx.github.io.git
jekyll new blog
cd blog
jekyll serve

      

This works locally. Then I committed and pushed to the git repository using the following commands:

cd ..
git add *
git commit -m "testing"
git push

      

The page build failed with the following error:

The file blog/css/main.scss

contains syntax errors. See https://help.github.com/articles/page-build-failed-markdown-errors for more information .

If you have any questions, please contact us at https://github.com/contact .

The main .scss is presented below:

---
# 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"
;

      

I think the problem is the css is not generated from scss. I'm not sure though. What is the problem?

+3


source to share


1 answer


You need to specify a directory _sass

. Check out my project which has a file main.scss

(located at css / main.scss) that imports partial files from the _sass directory -> https://github.com/wiredsister/wiredsister.github.io



0


source







All Articles