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…
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.
Written by
Related posts
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.