math.div
Jie-Huangi opened this issue · 7 comments
Jie-Huangi commented
大佬,我在deploy你网址时,显示math.div这里有问题。为什么在github上deploy会出现问题呢,我应该怎么解决吗?我现在是把带有math.div的代码全注释了,再deploy,就可以显示成功。如果不注释应该怎么弄呢?求指点了。
tw93 commented
math.div 是指?是不是版本依赖的问题,有详细报错吗?贴一下看看
Jie-Huangi commented
嗯嗯,不好意思,报错详情没有保存。line-height: 0 + math.div(round(math.div($doc-line-height, $size)*10000), 10000);
就是这种语句,带有math.div都在github里面都编译不通过。我windows电脑没有装jekyll,直接Fork了再copy到本地修改的代码。现在情况是注释了所有带有math.div的语句,上传后再重新编译就能看到自己修改的主页。https://jie-huangi.github.io 这是我copy结果。
Jie-Huangi commented
这是有问题的代码
@mixin font-size($size) {
font-size: 0px + $size;
font-size: 0rem + math.div($size, $doc-font-size);
line-height: 0 + math.div(round(math.div($doc-line-height, $size)*10000), 10000);
margin-bottom: 0px + $doc-line-height;
margin-bottom: 0rem + math.div($doc-line-height, $doc-font-size);
}
有问题的代码在github上编译报错提示:github-pages 228 | Error: Invalid CSS after "...ze: 0rem + math": expected ";", was ".div($size, $do..." on line 57
这是注释过后的结果,可以正常使用。
@mixin font-size($size) {
font-size: 0px + $size;
// font-size: 0rem + math.div($size, $doc-font-size);
// line-height: 0 + math.div(round(math.div($doc-line-height, $size)*10000), 10000);
margin-bottom: 0px + $doc-line-height;
// margin-bottom: 0rem + math.div($doc-line-height, $doc-font-size);
}
Jie-Huangi commented
Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
Logging at level: debug
Configuration file: /github/workspace/./_config.yml
GitHub Pages: github-pages v228
GitHub Pages: jekyll v3.9.3
Theme: jekyll-theme-primer
Theme source: /usr/local/bundle/gems/jekyll-theme-primer-0.6.0
Requiring: jekyll-github-metadata
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/index.scss':
Invalid CSS after "...ze: 0rem + math": expected ";", was ".div($size, $do..." on line 57
yangchuang commented
Jie-Huangi commented
把有div的地方全部注释就可以了,好像不影响使用
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年9月7日(星期四) 上午9:54
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [tw93/tw93.github.io] math.div (Issue #149)
我也碰到相同的问题。
本地能正常运行,但github pages的Action build失败了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
tw93 commented
这里一般是node版本的问题,包括对应的依赖导致,不过注释就好,一般用不上这个东西