+ 2

How do I host websites on GitHub from a folder?

Ive a repository. Inside of it I've a lot of folders. Inside of each folder,Ive a project. So, how do I host my website only from that project? Is there any way? Thanks in advance

18th Feb 2020, 9:47 PM
Sajid
Sajid - avatar
10 Antworten
+ 3
You need to make an index.html file. It is the default name used for the default page of a website. After making the file, add links to each home page in your folder, and host the website. You can host it by clicking on your repository -> settings, and then enable github pages. You can find your page then in [username].github.io/[repositoryname]
18th Feb 2020, 10:26 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
Here are the basic steps by GitHub for GitHub https://gist.github.com/TylerFisher/6127328
18th Feb 2020, 10:27 PM
BroFar
BroFar - avatar
18th Feb 2020, 10:31 PM
Sajid
Sajid - avatar
+ 2
sajid chowdhury your index.html must be outside any folders, I only see three folders on your rep, without any other files.
18th Feb 2020, 10:32 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
Can you share the link to your repository here?
18th Feb 2020, 10:29 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
Aymane Boukrouh I already have an index.html file. I also got the link but its says 404 page not found
18th Feb 2020, 10:29 PM
Sajid
Sajid - avatar
0
Aymane Boukrouh Can't I do it right from there? I only styles and files to be used from that folder.
19th Feb 2020, 8:09 AM
Sajid
Sajid - avatar
0
You have to turn on GitHub pages. If you use (yourusername).github.io as your repo name, it will automatically be the start if you want that.
19th Feb 2020, 9:26 PM
DavidDGTNT
DavidDGTNT - avatar
0
hey Sajib bhai did you find the solution please share it with us! I am stuck :/
7th Nov 2023, 6:07 AM
D. Dhanush
D. Dhanush - avatar