Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css conversion error with github pages #173

Open
calum-chamberlain opened this issue Oct 13, 2024 · 10 comments
Open

css conversion error with github pages #173

calum-chamberlain opened this issue Oct 13, 2024 · 10 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@calum-chamberlain
Copy link

I'm after some help with an error that I'm running into when trying to build for github-pages:

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    Invalid CSS after "...in-bottom: math": expected ";", was ".div($spacing-u..." on line 45

This seems to stem from one of the yat theme css files here and possibly others from the recent commit:

/tmp/jekyll-remote-theme-20241013-12540-3ng7gr/_sass/yat/_base.scss:45: Invalid CSS after "...in-bottom: math": expected ";", was ".div($spacing-u..." (Sass::SyntaxError)

Apologies if this isn't the source of the error - I think that github pages requires quite an old version of the jekyll-css-converter (I have 1.5.2 installed) which might be in conflict with this deprecation.

Happy to provide more details and post the gemfile as needed. All the files I'm using are here.

Thanks!

@jeffreytse jeffreytse self-assigned this Oct 14, 2024
@jeffreytse jeffreytse added the good first issue Good for newcomers label Oct 14, 2024
@jeffreytse
Copy link
Owner

Hi @calum-chamberlain,

Could you update to the latest version of YAT? It's better to use the git upstream version. I believe it's caused by a lower version of Jekyll.

Thanks & Regards

@calum-chamberlain
Copy link
Author

Hi @jeffreytse - thanks for that, and please excuse my ignorance, but I thought I was using the git upstream version so I think I must be doing something wrong. At the moment I have remote_theme: "jeffreytse/jekyll-theme-yat" in my _config.yml file.

It looks like I'm running Jekyll 3.9.5 for this (output for bundle exec jekyll --version).

@calum-chamberlain
Copy link
Author

Running with remote_theme: "jeffreytse/[email protected]" seems to work fine.

@jeffreytse
Copy link
Owner

@calum-chamberlain You're welcome! For the upstream version, it should work. To solve the problem, I suggest you to use jekyll-deploy-action instead.

@jeffreytse
Copy link
Owner

@calum-chamberlain @sternrest Now you can try the latest version. With this commit ed51549, you can build the site normally. : )

@calum-chamberlain
Copy link
Author

That hasn't worked for me. I still get a css conversion issue with github pages:

  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72
jekyll 3.9.5 | Error:  Invalid CSS after "  @if meta": expected "{", was ".function-exist..." on line 72
/home/chambeca/gems/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:in `rescue in convert': Invalid CSS after "  @if meta": expected "{", was ".function-exist..." on line 72 (Jekyll::Converters::Scss::SyntaxError)

        raise SyntaxError, "#{e} on line #{e.sass_line}"

I'm happy to pin my build to the commit before the divide updates until I get around to using the jekyll-deploy-action.

@jr-dev1001
Copy link

jr-dev1001 commented Nov 6, 2024

I'm dealing with the same problem as you.

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss': Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72 /usr/local/bundle/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:inrescue in convert': Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72 (Jekyll::Converters::Scss::SyntaxError)
raise SyntaxError, "#{e} on line #{e.sass_line}"

`

@cvillecsteele
Copy link

Same issue here.

@aigle-levant
Copy link

Same issue here :

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss': Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72

/usr/local/bundle/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:in rescue in convert': Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72 (Jekyll::Converters::Scss::SyntaxError)

raise SyntaxError, "#{e} on line #{e.sass_line}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@jeffreytse
Copy link
Owner

As Jekyll 3.x does not support jekyll-sass-converter 2.0, the older version of jekyll-sass-converter 1.5.2 doesn't support a lot of built-in functions, especially functions in meta module. Could you try to upgrade your Jekyll version to 4.X as this project's action for test.

Please see here: https://github.com/jeffreytse/jekyll-theme-yat/actions/runs/11436937614/job/31815433529

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants