Github页面样式错误未改style.scss
Github Pages style error without changing style.scss
我有一个 Github 页 运行 好几年了,将信息放入 table。
大约一周前,我开始收到 Style.scss 文件(自 2020 年 1 月以来未更改)的构建错误。将其放入 scss linter 中,出现以下错误:
Error: Invalid CSS after "": expected 1 selector or at-rule, was "---" on line 1 of stdin
下面的代码用于给 header 和页面背景上色,并在 header 中创建渐变颜色。它还使 table 更宽,因此可以在屏幕上看到更多内容。
谁能解释一下这个错误是什么意思?
---
---
@import "{{ site.theme }}";
.page-header {
background-color: #34657F;
background-image: linear-gradient(#34657F, #34657F);
}
.main-content {
background-color: #333f48;
text-align:center;
max-width: 100%;
h1,
h2,
h3,
h4,
h5,
h6 {
color: #ffffff;
}
table {
th {
color: #ffffff;
}
th,
td {
color: #ffffff;
}
}
}
编辑:
Github页面错误
Your SCSS file assets/css/style.scss has an error on line 1: File to import not found or unreadable: cayman. Load path: /tmp/jekyll-remote-theme-20210727-6-1xrrbu1/_sass.
原来这是 Github 页的问题。
https://github.com/pages-themes/cayman/issues/130#issuecomment-886056882
访问站点主题的方式已更改,导致
@import "{{ site.theme }}";
打破。
切换到直接引用您的主题(在我的例子中是 cayman)似乎可以解决这个问题。
@import 'jekyll-theme-cayman';
我有一个 Github 页 运行 好几年了,将信息放入 table。
大约一周前,我开始收到 Style.scss 文件(自 2020 年 1 月以来未更改)的构建错误。将其放入 scss linter 中,出现以下错误:
Error: Invalid CSS after "": expected 1 selector or at-rule, was "---" on line 1 of stdin
下面的代码用于给 header 和页面背景上色,并在 header 中创建渐变颜色。它还使 table 更宽,因此可以在屏幕上看到更多内容。 谁能解释一下这个错误是什么意思?
---
---
@import "{{ site.theme }}";
.page-header {
background-color: #34657F;
background-image: linear-gradient(#34657F, #34657F);
}
.main-content {
background-color: #333f48;
text-align:center;
max-width: 100%;
h1,
h2,
h3,
h4,
h5,
h6 {
color: #ffffff;
}
table {
th {
color: #ffffff;
}
th,
td {
color: #ffffff;
}
}
}
编辑:
Github页面错误
Your SCSS file assets/css/style.scss has an error on line 1: File to import not found or unreadable: cayman. Load path: /tmp/jekyll-remote-theme-20210727-6-1xrrbu1/_sass.
原来这是 Github 页的问题。
https://github.com/pages-themes/cayman/issues/130#issuecomment-886056882
访问站点主题的方式已更改,导致
@import "{{ site.theme }}";
打破。
切换到直接引用您的主题(在我的例子中是 cayman)似乎可以解决这个问题。
@import 'jekyll-theme-cayman';