KUMAR HARSH
KUMAR HARSH

Reputation: 103

hosting multiple github pages from one github repository

I have github repository which contains 4 different folders named module2/3/4/5 solutions respectively each containing index.html and style.css files which are a part of a coursera course i am currently pursuing....now i can't figure out how to host all these 4 different pages separately from this one repository....all tutorials and documentation tell to create a new repo named username.github.io and simply push the index.html and it'll work which i understand....but i don't want 4 different repositories for solutions of different weeks...rather i would like to host all 4 independently form this very same repository....please tell me what to do?

I want my repository to look like this guys repsitory

https://github.com/siddartha19/Coursera-HTML-CSS-and-JavaScript-for-Web-Developers

as you can see all the different module solutions are hosted from this repository....

Upvotes: 4

Views: 3249

Answers (1)

Samuel-Zacharie Faure
Samuel-Zacharie Faure

Reputation: 1152

The architecture of the github page website mirror the architecture of the repository.

From your example, one of the page's URL is:

https://siddartha19.github.io/Coursera-HTML-CSS-and-JavaScript-for-Web-Developers/Assignments/module-3/index.html

The repository name is 'Coursera-HTML-CSS-and-JavaScript-for-Web-Developers' - It contains a folder 'Assignments' which contains 'module-3' which contains an index.html file.

Do you see how the URL format mirrors the structure of the folders?

If you want your github page to have the same architecture you can just do the same folder structure.

Upvotes: 0

Related Questions