José Luiz
José Luiz

Reputation: 333

How add github.io Pages for my repositories?

I have several repositories in my GitHub profile. To out one on github.io is easy, I read the tutorial.

But how can I create several pages on github.io for my repositories? Like this:

All of the pages I want to host are simple pages. Only HTML5 + JavaScript + CSS.

Upvotes: 1

Views: 529

Answers (2)

Chris
Chris

Reputation: 136880

You're looking for GitHub Pages' project sites:

Project Pages sites are available in the following locations after they're built:

  • A Project Pages site for a personal account is available at http(s)://<username>.github.io/<projectname>.
  • A Project Pages site for an organization account is available at http(s)://<orgname>.github.io/<projectname>.
  • If you're using a custom domain, see "Custom domain redirects for GitHub Pages sites."

Project pages are built from code found in the respective project's repository. There are three possible places to put the code:

  • In a branch called gh-pages (this used to be the only option)
  • In a branch called master
  • In a folder called docs/ in your master branch

You can choose which of these three sources gets used for each repository.

Upvotes: 1

Scott Havard
Scott Havard

Reputation: 79

If I remember correctly, github pages creates a repository that will generate the URL https://profile.github.io/[contents of the repository].

This means that every HTML file in that repository will be served as a different webpage.

For example, let’s say you have page1.html and page2.html in the repository. Those pages will have the urls: https://profile.github.io/page1 and https://profile.github.io/page2.

One possibility is to clone/copy your repositories, and put them into your github.io repository. With my previous example, let’s say page1.html is in repository1 and page2.html is in repository2. If all of these are copied into the github.io repo, then you will have: profile.github.io/repository1/page1 and profile.github.io/repository2/page2.

Let me know if this helps!!

Upvotes: 0

Related Questions