GitHub Pages "Normal" Setup for User & Organization Pages
Let’s say your GitHub username is “alice”. If you create a GitHub repository named alice.github.com, commit a file named index.html into the master branch, and push it to GitHub, then this file will be automatically published to http://alice.github.com/... The same works for organizations.
Read more here: http://pages.github.com/
However... the downside of this is that anyone that forks this repo won't get it as a GitHub Pages repo when they are working on it... because they have a different GitHub "username" (or "organisation name").
So the trick is to not use a master
branch as the documentation tells you... rather, use a gh-pages
branch, as you would for your other "Project Pages".
- Create a New Repository on GitHub (don't follow any of the suggested setup instructions).
mkdir alice.github.com
cd alice.github.com
git init
git branch -m master gh-pages
<- renames the "master" branch to "gh-pages"echo "<h1>Hello Alice</h1>" > index.html
git add index.html
git commit -m "initial commit"
git remote add origin [email protected]:alice/alice.github.com.git
git push -u origin gh-pages
I'm personally using this for my "viewsource" Organization Page... which is an open source GitHub Pages hosted CDN for popular (and less popular) JavaScript/CSS/HTML libraries and resources.
Doesn't work.