starry99 / catbook

a category-centric theme for Jekyll
http://starry99.github.io/catbook
MIT License
82 stars 137 forks source link

error upon `jekyll serve` #12

Open SimonEnsemble opened 1 year ago

SimonEnsemble commented 1 year ago

with the new version of jekyll, the site does not launch upon jekyll serve.

Error: Declarations may only be used within style rules.
    ╷
180 │         margin-top: 2rem;
    │         ^^^^^^^^^^^^^^^^
    ╵
  /Users/cokes/catbook/assets/css/main.scss 180:9  @content
  _flexible.scss 21:9                              mobile-only()
  /Users/cokes/catbook/assets/css/main.scss 179:5  root stylesheet
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    Declarations may only be used within style rules.
                    ------------------------------------------------
      Jekyll 4.3.1   Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/opt/homebrew/lib/ruby/gems/3.1.0/gems/jekyll-sass-converter-3.0.0/lib/jekyll/converters/scss.rb:175:in `rescue in convert': Declarations may only be used within style rules. (Jekyll::Converters::Scss::SyntaxError)
songtao-ye commented 1 year ago

open "assets\css\main.scss"

change

.aboutme {
    @include breakpoint(medium) {
        max-width: 30rem;
        margin-top: 5.5rem;

        img {
            float: none;
        }
    }
    }

    @include mobile-only {
        margin-top: 2rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

to

.aboutme {
    @include breakpoint(medium) {
        max-width: 30rem;
        margin-top: 5.5rem;

        img {
            float: none;
        }
    }

    @include mobile-only {
        margin-top: 2rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}