简体   繁体   English

如何在我的 GitHub 页面站点上修复 Sass?

[英]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.

相关问题 如何在我的 GitHub Pages 站点上创建子域? - How can I create a subdomain on my GitHub Pages site? 如何修复在 GitHub 页面上导入 css 的 404 错误? - How can I fix 404 error importing css on GitHub Pages? 我可以在github页面站点中提供一个javascript文件而不是index.html吗? - Can I serve a javascript file instead of index.html in my github pages site? 如何在 Github Pages 上托管我的 javascript web 应用程序? - How can I host my javascript web application on Github Pages? 我的网站在 760px 处中断。 我该如何解决? - My site breaks at 760px. How can I fix it? 我如何解决无法加载资源状态 404 github 页面的问题 - how can i fix failing to load resource status 404 github pages 如何修复 github 页面中未显示的图像? - How do i fix image not displaying in github pages? 我在 github 上的 jekyll 站点没有显示我的 sass (scss) - My jekyll site on github is not showing my sass (scss) 如何修复此错误以及如何正确编写 github 用户名? 是有美元符号还是没有? - How can I fix this error and how do I write my github username correctly? is it with a dollar sign or without? 我如何有一个搜索框,人们可以在其中搜索我站点内的页面? - How can I have a search box where people can search for pages within my site?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM