Skip to content

Pages Generator

Last week we released a feature for hosting your custom websites for your projects that we call 'GitHub Pages'. For personal repositories, the process is easy enough - just create…

Author

Last week we released a feature for hosting your custom websites for your projects that we call ‘GitHub Pages’. For personal repositories, the process is easy enough – just create a repo named ‘username.github.com’. However, for project pages we faced a decision – do we ask you to create a new repository for each project page (ie: ‘myproject-pages’ or something), do we ask you to put a ‘website’ subdirectory in your project, or do we ask you to create an unrelated branch (ie, a branch that has no common ancestor with your project code)?

The first option would be annoying, doubling everyone’s repository count. The second would dirty up your working directory with code you may not want released with your project. So we decided on the last, but the cost is that an unrelated branch is a concept that can be a bit confusing, in that some people create the branch and then don’t know how to get back to their source code after the process is complete (generally just a ‘git checkout master’, btw).

So, we’ve simplified the process for you. Yesterday we pushed out a Pages generator for each project that will create your new branch and seed it with a nice looking website customized for your project. Then all you have to do is fetch it down and check it out to customize it if you feel so inclined.

You can find the link on the ‘Admin’ tab (yes, you have to be the owner of the project for now). If you do not have a ‘gh-pages’ branch, you should see a ‘Generate Project Page’

Click on that link and you’ll be taken to a form you can fill out to customize your project page:

Any of these fields that you fill out will be used to create your initial web page. There are a few things that are brought in automatically, too. Your project name and description are pulled in (though you can change them), your contact information is added and your git project is scoured for contributors whom are all added.

Furthermore, you can add your Google Analytics “Web Property ID” and it will add the javascript snippet for you. You can also choose a color (a random one is selected) for your page background color and our generator will automatically determine the complementary color to use for titles and links and whether to use a black or white foreground color for your text.

So, if I fill this out and use the color that has been selected for me for my munger project and hit ‘Create Page’, I’ll see a message like this:

And a few minutes later, I have a nice new page up at http://schacon.github.com/munger.

The color choice there may not be your cup of tea, but you can choose any background color you want. It may be helpful as a starting point so you don’t have to do the whole ‘rm .git/index; blah blah’ stuff.

Explore more from GitHub

Company

Company

The latest on GitHub, from GitHub.
GitHub Universe 2024

GitHub Universe 2024

Get tickets to the 10th anniversary of our global developer event on AI, DevEx, and security.
GitHub Copilot

GitHub Copilot

Don't fly solo. Try 30 days for free.
Work at GitHub!

Work at GitHub!

Check out our current job openings.