Github Pages does not build my CSS file when deploying

Viewed 150

I'm new to Web development and trying to build my first page in Github pages. At the first place, css link is not right. I fixed it. Currently it load the right file (I think, because in the DevTools source file link to the correct file same as my repo). But the loaded CSS file in the website is only contain CSS reset added by github, and my css file is not loaded. I tried many ways but still stuck in this point. Please help me if you know. Thanks a lot.

My github page: https://trongtruong2509.github.io/odin-todolist/

My repo: https://github.com/trongtruong2509/odin-todolist

1 Answers

When linking the stylesheet it is not the right path. With what you have now (assets/css/style.css) the assets folder is in the same folder as the HTML file. To fix this you need to link like this: ../../assets/css/style.css. Each ../ moves it back 1 at a time folder.

Related