GitHub Pages doesn't show style #22167
-
Hello! I have a problem with Pages. It shows well my other projects, but with this project there is a situation. Tetrisand to the code: Hi-Pyncho/Vanilla-JS-Projects🎮 💻 🐵 Different projects using only JS, CSS, HTML. No libraries, no frameworks. It works locally nice. And i tried to create another repository and put the project in it. It also worked well. I have no idea what is going on. Thanks for help! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi @Hi-Pyncho, welcome to the GitHub Support Community! I’m not quite sure what your issue is exactly. The page you’ve linked does appear to be styled using CSS from the Have you already managed to fix this or are there still issues? Can you post a screenshot of what you’re expecting to see? |
Beta Was this translation helpful? Give feedback.
-
I think I found the issue! It looks like you’re moving one level too high when trying to import your other CSS file: github.comHi-Pyncho/Vanilla-JS-Projects/blob/3fb01677367d030ba549de9691a9ba04d076d947/Projects/tetris/style.css#L1
What you actually want is this:
|
Beta Was this translation helpful? Give feedback.
-
As an addition to this, this is happening because GitHub Pages adds the repository name |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot! That helped! |
Beta Was this translation helpful? Give feedback.
As an addition to this, this is happening because GitHub Pages adds the repository name
Vanilla-JS-Projects
to the URL. This can be accounted for in local development when you build your site using Jekyll—GitHub’s default site builder—but likely won’t be when you’re using plain HTML or an alternate static site framework. Fixing this on GitHub Pages may break your development locally unless you account for this.