
GitHub Pages allow you to publish web content to a github.com subdomain named after your username. With Pages, publishing web content becomes as easy as pushing to your GitHub repository.
If you create a repository named you.github.com, where you is your username, and push content to it, we’ll automatically publish that to http://you.github.com. No FTP, no scp, no rsync, nothing. Just a simple git push and you’re done. You can put anything here you like. Use it as a customizable home for your Git repos. Create a blog and spread your ideas. Whatever you want!
If you create a gh-pages branch on any regular repository and push content there, we will automatically publish that to http://you.github.com/your-repo. This allows you to create instant documentation sites that are as easy to collaborate on as your code. Since you’ll want a blank slate for your Pages branch, you can use a little Git trick to create a new branch that has no parents. Just follow the instructions at pages.github.com and you’ll be up and running in a few seconds.
In addition to all this, we thought it would be nice to give you an easy way to assemble more complex sites. That’s why we pipe every Pages-bound repo/branch through Jekyll, my very own blog-aware static site generator that was purpose built specifically for this task. With Jekyll, you have access to layouts, includes, filters, syntax highlighting, Textile and Markdown, and intelligent handling of blog entries. All you have to do is follow the Jekyll conventions and we’ll handle the transformation. For an example of a Jekyll site that works on Pages, check out my tpw blog repo.
Now that you know how it works, let’s take a walk through some of the pages that have popped up since we started tweeting about the feature.
The GitHub Crew
- pjhyett is a man of big ideas, but few words
- defunkt created a meme (fork and add your own image!)
- mojombo (me)
- schacon teaches you Git
- tekkub is porting his existing homepage
Our Very Creative Customers
- kneath had the first Page I remember seeing
- hans keeps it simple
- ryan-allen likes it clean
- shepjeng is enigmatic
- 3n takes JavaScript to the limit
- lachlanhardy is creating JavaScript snippets
- atmos seamlessly pulls in his GitHub repos with jQuery
- quamen likes to draw
- pointcom has proposed a staring contest
- kirk quotes Jefferson
- bketelsen has a cool menu
- alx is already using Jekyll
- voodootikigod also knows about Jekyll
- newtonapple stays with Webby (generated locally)
- eoghanmccabe understands fully
Project Pages
We hope you have fun with Pages, I know we’ll have a blast looking at what you all come up with!



Hooked up a nice page for yourself? Link it here in the comments!
Pure awesomeness! For me actually more the part of being able to host project documentation within its git repo.
Oh sure, I have one too.
Totally awesome!
Can’t wait to play when I get off work.
Oy, this is so sweet. Remind me why I need rubyforge now?
@quirkey: for mailing lists… which I predict will be the next github feature!
I posted about this on my blog earlier – seems that I just pre-empted it.
Here’s mine.
Um, github really doesn’t like these repo names and doing “raw” view of files:
http://github.com/tekkub/tekkub.github.com/raw/master/index.textile
becomes:
http://github.com/tekkub/tekkub.git/hub.com/raw/master/index.textile
and thus dies.
Otherwise, this is awesome! I might actually get around to making a blog now. Great job guys.
@jameskilton that’s a known bug, we’re working on it!
Thanks, nice feature. :)
I have a terribly boring one at http://henrik.github.com/
If the website for a project is in a subfolder of the master branch, can that be used for the username.github.com/project-name website? Is there a way for the gh-pages branch to be a mirror of that subfolder in master?
fwoar i’m famous! no calls though, seriously, i’m on holiday!
Specifically I’m thinking of all my projects with website/ folders
Here is one for a project I forked, utility_belt It uses html that was up onrubyforge, so just lived in a /html folder.
Now I am debating figuring out how to manage both via subtree merges, or just say screw bothering with RF (in this case it’s not my project, so it’s moot).
Can someone explain what
@rm .git/index@does? I’m assuming this is the key to getting the gh-pages branch to start from fresh.
@davetron
symbolic-ref sets HEAD to an otherwise non-existent branch with no history. The index, however, will contain references to everything in your current repo. Removing that index is the easiest way to get the tree into an uninitialized state.
Nice job, guys.
dustin, so then after I create my content, my previous work is still on master (e.g.), so @git checkout masterandgit checkout gh-pageswill let me go back and forth, without worry that my code will get published on thegh-pagesbranch?Could we support a gh_pages and/or website folder in master branch?
@davetron5000 Exactly. The histories are entirely disconnected, but the blogs will be in the same repo. Try it, and then do a `git log —all —graph` (or use a visual tool) and you’ll see how disconnected they are.
The git project itself does this to keep things in the same place that are related to the project, but really distinct (such as docs).
Github’s model works really well since it’s a github specific branch that lives just for publishing documentation via github.
BTW, I think the server-side templating through Jekyll is a wonderfully sweet idea. Esp since its an existing open source project.
This is great! Especially for documenting projects. Really liking the Jekyll integration as well.
@drnic just use a submodule
Nice work! I can’t wait for CNAME mapping :-).
-T
@defunkt – you no doubt have a nice script to convert an inline website into a ‘branch’ + create a submodule link in its place, already? may I see?
just made my own random personal page for the hell of it…
http://danmayer.github.com
man, github gets exponentially cooler with every new feature!
http://yawningman.github.com/
aww mine’s still not working.
My github page – voodootikigod.github.com – started out as a jekyll style blog using the default theme that comes with it. I have evolved it and actually removed the underlying jekyll code. It now aggregates all of the feeds of content I generate on the internets on the client side. I am going to grow it to cache and do some other cool things, but I wanted to clarify — not jekyll anymore, and source code is available for forking.
GitHub you rock.
The new MacRuby.tmbundle:http://github.com/drnic/macruby-tmbundle project has started life with a fancy jekyll + github pages website – http://drnic.github.com/macruby-tmbundle/
Great stuff.
http://elemel.github.com/
Aw, I’m disappointed I didn’t get a mention.
Was my vulgarly-expressed confusion regarding the point of the feature too-much-so for the public eye? d-:
http://elliottcable.github.com/
Here we go: http://lennartkoopmann.github.com/colored/
Howdy,
I know I’m posting late to the party, but I was wondering if there’s any plans to add reStructuredText support to Jekyl/Github pages.
Not being a Rubyist, I’m not sure if there are any ruby-versions of reST parsers out there (I’m guessing no).
It’s nice that the project README files can do reST, though, so I was just curious.
+1 for ability to CNAME to my github personal page (and specify what sub-domain I want github to answer to, e.g. BLOG.mydomain.com). Similar to how Google does this with Google Apps for Domains.
+1 for ability to have documentation have a gh-pages sub-folder on the master branch be linked to (in addition to a dedicated gh-pages branch if you like) since otherwise I don’t think its possible to version page content along with the code its documenting. Its also much less intuitive to expect others to look for documentation in a special branch whereas a sub-folder is really obvious.
And my Jekyll experiment is forming at : http://grempe.github.com
Great new feature. Enjoying Jekyll as well.
I don’t know why, but a page whose source is written in markdown is getting cut when passed through Jekyll: http://hl.github.com/book.html , with source at http://github.com/hl/hl.github.com/tree/master/book.markdown
I’d link directly to the raw source, but github has another bug, links in the following form:
get redirected to:
Notice the slash between git and hub. So far this only seems to occur in the raw view.
Regarding my previous comment, it seems to be a problem with the handling of the “
-” syntax in markdown, specifically:When the above occurs in the markdown source, the page gets cut at the “
-—-”, which is turned into a horizontal rule.Why would this occur? YAML?
Solution to linking from your master branch to your gh-pages branch via a website folder:
git submodule add -b gh-pages git@github.com:drnic/macruby-tmbundle.git website gca -m “website → gh-pages folder”Seems to work.
Okay, I think I’ve located the problem with the bad interaction of the YAML frontmatter with the dashes-as-h2 markdown syntax. It’s due to the regexp at: http://github.com/mojombo/jekyll/tree/master/lib/jekyll/convertible.rb#L16 . Apparently, “.*?” is still too greedy: it attempts to get the last possible match for the succeeding expression, i.e. the three dashes. This causes it to match up to the last line that begins with three dashes.
My solution would have been to split the string into lines (possibly lazily, just extracting lines until the first set of three dashes (after the initial three dashes, of course) or until end of string, which would mean failure) but I’m not very good at ruby.
Shameless adaptation from Mojombo’s site :-)
cmelbye.github.com
Basically, I just mashed up some things from other sites and rearranged and added stuff as needed, and I’ve come out with something I’m really liking.
DISQUS commenting support was also easily added, and that’s working quite well.
Great, yet another bug with regards to markdown (or maybe not a bug after all, possibly just a difference in how markdown.pl works versus how whatever you’re using).
When using markdown.pl the following becomes a list-within-list:
* this * is * not * athens!However the markdown formatter in use here renders it as a single list element, this * is *not * athens!
Excellent work! I love the fact that it’s now just dead easy to get pages up and going with Git. Wish I had this a while ago.
http://andychilton.github.com/
Summary of my escapades with Github Pages and Jekyll http://drnicwilliams.com/2008/12/21/migrating-project-websites-to-github-pages-with-sake-tasks-new-websites-with-jekyll_generator/
Help ! I followed the instructions on http://pages.github.com/ and successfully created a page for my project. I ofcourse committed and pushed my project before doing so, due to the warnings on the right. I did this in the same folder as my project.
Now my local repo is empty (of the source code of my project). I am new to github, so am in a state of panic. Please help, and my apologies if this is a silly basic question.
How do i continue working on my source. Should i just unzip and “add” and “commit” my source again ? Or will that create conflicts ? Thanks in advance, and happy holidays!
Very cool! I got mine over here: http://bdotdub.github.com/ and will be moving project sites over soon enough :)
@rkumar – run ‘git checkout master’ to get your source code back into your working directory.
how can one include a subdirectory to store static content ( i.e. _static to store images, js and css )?
Do I need to create _static project then the gh-pages branch there?
Here’s my site: http://jnraptor.github.com
Jekyll 0.2.1 is not building properly due to a bug in the gemspec file, because one of the test file has an incorrect link, thus no server option for the gem and categories aren’t working. Could you please correct it?
Besides, site.posts only shows posts from the root _posts folder and not from any subfolders.
If i print out site.posts, I’m unable to print out site.categories.[category] on the same page. However, printing out site.categories.[category] works if it’s on its own. Check out http://jnraptor.github.com/personal.html for this issue. (once Jekyll has been updated to 0.2.1 of course)
Hi, I’m newbie using git, it is not working for me…
http://pabloq.github.com/
does anyone know why???Thanks
Well, I couldn’t get it working…
http://github.com/marcric/marcric.github.com/tree/master
If someone could help?
cool it’s working now :D
Any idea how to use latex with jekyll?
If we use the gh-pages route to make docs for a repo, and that repo is a private repo, will the publication of it at something.github.com/project be private as well?
I’m interested in having a private development blog for the team where we keep notes, but it’s a private repo, so of course we want the dev blog to be private as well.
I tried out the gh-pages branch solution with a private repo, but it publishes it publicly. I would suggest that be noted in the docs. Folks might think it a useful and good way to do some internals docs, but then have their private project’s docs published publicly.
It would be nice if I could write a static 1 page site in markdown. Any pointers?
Yay. http://kangster.github.com/
Oh @defunkt… If only flickr had a photo as awesome to match my username. What luck you have
I just got started with my page, and I was wondering if the “related posts”-algorithm you have enabled is the fast, stupid one or the slow, clever one?
MY God, it is not working for me…why ? http://tumashu.github.com If someone could help?
One more for the list: http://thruflo.github.com
Hi! The jekyll documents I saw do not explain how do I allow comments from the readers of my site… or if/how can I generate RSS/Atom feeds for it. Where can I get such info?
Would this be easy to set up on a private server using git hooks? I'm looking at you, post-update...
Nice feature. Is there a way to have files from a static dir under a project page (in a gh-pages branch) served (via http://user.github.com/project/static)?
Sphinx puts static resources in a _static dir. It looks like these resources aren't served. I know there's a sphinx extension available for github, but I'm hoping there's another solution.
My page is dynamically generated with gpgen using the GitHub's API:
http://stockrt.github.com
gpgen is mine, you will found it in my projects.
Regards,
Rogério Schneider