menu

Questions & Answers

Github pages not recognizing CSS

This is my first time trying to use Github pages. I am able to to get the index.html to work, but the style will not. I am serving from the master branch docs/ folder.

Everything works fine when I run it on my local host. Any ideas?

File tree

File tree

Stylesheet

Stylesheet

Tried changing my static and templated folder names to 'docs' and 'css' as I thought Github looks in specific folders for HTML and CSS files. Also looked to make sure my href was pointing to the right place. I'm new to this, so I may have made a mistake.

EDIT: I am using Flask, which may be causing the issue, website is still static. IDK if Flask and static contradictory.

Thanks

Comments:
2023-01-20 00:10:05
git is not the same as github. Check the console for errors, perhaps your css don't load for some reason
2023-01-20 00:10:05
Can you reference the repo?
2023-01-20 00:10:05
I believe the repository mklupar has the issue in is this one. The GitHub pages site is public here.
Answers(0) :