I host the github page and want to link index.html to main.css, which is located in a folder called "stylesheets" also in the root directory.
my file structure:
index.html stylesheets - main.css
right now i have:
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
in <head> , but that doesn't work?
<head>
First, you must create the gh-pages branch, a special GitHub branch.You can find and create it on the settings page of your project using the button Automatic page generator .The branch will be displayed on doamin http://username.imtqy.com/project/
So the path should be stylesheets/main.css not /stylesheets/main.css
stylesheets/main.css
/stylesheets/main.css
if these are not project pages .. "means" that you are creating repo youruser.imtqy.com (username pointer .imtqy.com) not atuo genereate gh-pages, because its usage pattern
just:
commit and click it
/style β you are in the root directorystyle/ β you are in the currrent directory./style β itβs safer to navigate the current directory
/style
style/
./style
Wait 5 minutes ... and cheers!
Try removing the front '/' from /stylesheet so that it loads relative to the current route: stylesheet/...
/stylesheet
stylesheet/...