layout | title | prev_section | next_section |
---|---|---|---|
docs |
GitHub Pages |
extras |
deployment-methods |
GitHub Pages are public web pages for users, organizations, and repositories, that are freely hosted on GitHub's github.io domain or on a custom domain name of your choice. GitHub Pages are powered by Jekyll behind the scenes, so in addition to supporting regular HTML content, they’re also a great way to host your Jekyll-powered website for free.
GitHub Pages work by looking at certain branches of repositories on GitHub. There are two basic types available: user/organization pages and project pages. The way to deploy these two types of sites are nearly identical, except for a few minor details.
User and organization pages live in a special GitHub repository dedicated to
only the GitHub Pages files. This repository must be named after the account
name. For example, @mojombo’s user page
repository has the name
mojombo.github.io
.
Content from the master
branch of your repository will be used to build and
publish the GitHub Pages site, so make sure your Jekyll site is stored there.
GitHub Pages are initially configured to live under the
username.github.io
subdomain, which is why repositories must
be named this way even if a custom domain is being used.
Unlike user and organization Pages, Project Pages are kept in the same
repository as the project they are for, except that the website content is
stored in a specially named gh-pages
branch. The content of this branch will
be rendered using Jekyll, and the output will become available under a subpath
of your user pages subdomain, such as username.github.io/project
(unless a
custom domain is specified—see below).
The Jekyll project repository itself is a perfect example of this branch structure—the master branch contains the actual software project for Jekyll, however the Jekyll website (that you’re looking at right now) is contained in the gh-pages branch of the same repository.
For more information about what you can do with GitHub Pages, as well as for troubleshooting guides, you should check out GitHub’s Pages Help section. If all else fails, you should contact GitHub Support.