Search code examples
htmlcssgithubsassparceljs

My scss files wont load on github html pages for some reason


new to programming and I wanted to post my portfolio site on github. My index pages shows up but some of pictures and all of my scss files wont show up. Any help would be greatly appreciated.

Here's a link to the repo https://github.com/ELeonJohnson/ELeonJohnson.github.io


Solution

  • You have to compile your .scss files and refer only the .css files in your index.html because browser doesn't understand scss.

    If you have installed sass by running,
    sass --watch _main.scss:main.css
    You can get the compiled css version. For more information refer to the documentation of sass

    In your case parcel.js have bundled your project into dist folder. For github pages you only need the content inside this dist folder. You can remove all the source code other than which is in the dist folder and move all the things inside dist into your root folder ELeonJohnson.github.io