[英]How can I fix the Sass on my GitHub Pages site?
So I'm coding on VS Code.所以我在 VS Code 上编码。 I have Sass installed and I'm coding with it.我安装了 Sass 并且正在使用它进行编码。 When I view it in localhost, it looks how I want it to be.当我在 localhost 中查看它时,它看起来是我想要的样子。 Then I upload it to GitHub and for some reason it is not working on GH Pages.然后我将它上传到 GitHub 并且由于某种原因它不适用于 GH Pages。 Here is the link: GitHub Dark Mode这是链接: GitHub 暗模式
I was trying to make a Dark Mode that I could add on my site.我试图制作一个可以在我的网站上添加的暗模式。 Here is the original tut CodePen that I followed: The CodePen .这是我遵循的原始 tut CodePen: CodePen 。 Do I have to convert it all to CSS?我是否必须将其全部转换为 CSS?
Can you all please help?大家可以帮忙吗?
Best,最好的,
NotDiamondZ不是钻石Z
You need to compile the Sass file and call it on your html with.css extension instead of.scss您需要编译 Sass 文件并在您的 html 上使用 .css 扩展名而不是 .scss 调用它
eg.例如。
<link rel="stylesheet" type="text/css" href="styles.css">
Perhaps you can check out this CSS cannot be loaded from file:
URLs unless they end in a .css
file extension也许你可以看看这个CSS cannot be loaded from file:
URLs unless they end in a .css
file extensions
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.