• GitHub Pages

    mojombo 18 Dec 2008

    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

    Project Pages

    We hope you have fun with Pages, I know we’ll have a blast looking at what you all come up with!

  • Comments

    mojombo Thu Dec 18 13:27:54 -0800 2008

    Hooked up a nice page for yourself? Link it here in the comments!

    mattmatt Thu Dec 18 13:33:18 -0800 2008

    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.

    tristandunn Thu Dec 18 13:36:19 -0800 2008

    Totally awesome!

    Can’t wait to play when I get off work.

    quirkey Thu Dec 18 13:39:05 -0800 2008

    Oy, this is so sweet. Remind me why I need rubyforge now?

    technomancy Thu Dec 18 13:43:02 -0800 2008

    @quirkey: for mailing lists… which I predict will be the next github feature!

    lukeredpath Thu Dec 18 13:45:34 -0800 2008

    I posted about this on my blog earlier – seems that I just pre-empted it.

    Here’s mine.

    jameskilton Thu Dec 18 13:52:37 -0800 2008

    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.

    mojombo Thu Dec 18 13:54:26 -0800 2008

    @jameskilton that’s a known bug, we’re working on it!

    kaikuehne Thu Dec 18 14:03:24 -0800 2008

    Thanks, nice feature. :)

    henrik Thu Dec 18 14:07:41 -0800 2008

    I have a terribly boring one at http://henrik.github.com/

    drnic Thu Dec 18 14:35:59 -0800 2008

    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?

    ryan-allen Thu Dec 18 14:36:33 -0800 2008

    fwoar i’m famous! no calls though, seriously, i’m on holiday!

    drnic Thu Dec 18 14:36:35 -0800 2008

    Specifically I’m thinking of all my projects with website/ folders

    timocratic Thu Dec 18 14:45:23 -0800 2008

    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).

    davetron5000 Thu Dec 18 14:48:14 -0800 2008

    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.

    dustin Thu Dec 18 14:52:53 -0800 2008

    @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.

    greatseth Thu Dec 18 14:56:44 -0800 2008

    Nice job, guys.

    davetron5000 Thu Dec 18 15:06:53 -0800 2008

    dustin, so then after I create my content, my previous work is still on master (e.g.), so @git checkout master and git checkout gh-pages will let me go back and forth, without worry that my code will get published on the gh-pages branch?

    drnic Thu Dec 18 15:10:23 -0800 2008

    Could we support a gh_pages and/or website folder in master branch?

    dustin Thu Dec 18 15:11:05 -0800 2008

    @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.

    drnic Thu Dec 18 15:12:44 -0800 2008

    BTW, I think the server-side templating through Jekyll is a wonderfully sweet idea. Esp since its an existing open source project.

    quamen Thu Dec 18 15:22:53 -0800 2008

    This is great! Especially for documenting projects. Really liking the Jekyll integration as well.

    defunkt Thu Dec 18 16:23:37 -0800 2008

    @drnic just use a submodule

    tsally Thu Dec 18 17:18:48 -0800 2008

    Nice work! I can’t wait for CNAME mapping :-).

    -T

    drnic Thu Dec 18 18:25:01 -0800 2008

    @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?

    danmayer Thu Dec 18 21:56:12 -0800 2008

    just made my own random personal page for the hell of it…

    http://danmayer.github.com

    yawningman Fri Dec 19 05:51:52 -0800 2008

    man, github gets exponentially cooler with every new feature!

    http://yawningman.github.com/

    TomK32 Fri Dec 19 08:41:10 -0800 2008

    aww mine’s still not working.

    voodootikigod Fri Dec 19 08:42:32 -0800 2008

    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.

    drnic Fri Dec 19 15:59:59 -0800 2008

    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/

    elemel Fri Dec 19 23:29:43 -0800 2008
    elliottcable Sat Dec 20 01:31:35 -0800 2008

    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/

    lennartkoopmann Sat Dec 20 12:04:11 -0800 2008
    lianos Sat Dec 20 12:28:58 -0800 2008

    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.

    grempe Sat Dec 20 15:08:53 -0800 2008

    +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.

    hl Sat Dec 20 19:17:39 -0800 2008

    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:

       http://github.com/hl/hl.github.com/raw/master/book.markdown
    

    get redirected to:

       http://github.com/hl/hl.git/hub.com/raw/master/book.markdown
    

    Notice the slash between git and hub. So far this only seems to occur in the raw view.

    hl Sat Dec 20 19:41:19 -0800 2008

    Regarding my previous comment, it seems to be a problem with the handling of the “-” syntax in markdown, specifically:

      h2 title
      --------
    
      Some text
    

    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?

    drnic Sat Dec 20 20:02:40 -0800 2008

    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.

    hl Sat Dec 20 20:21:23 -0800 2008

    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.

    cmelbye Sat Dec 20 20:58:25 -0800 2008

    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.

    AmkG Sat Dec 20 22:21:21 -0800 2008

    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!

    andychilton Sat Dec 20 22:49:53 -0800 2008

    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/

    rkumar Sun Dec 21 05:34:51 -0800 2008

    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!

    bdotdub Sun Dec 21 16:07:51 -0800 2008

    Very cool! I got mine over here: http://bdotdub.github.com/ and will be moving project sites over soon enough :)

    schacon Tue Dec 23 09:52:43 -0800 2008

    @rkumar – run ‘git checkout master’ to get your source code back into your working directory.

    batok Tue Dec 23 22:32:06 -0800 2008

    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?

    jnraptor Wed Dec 24 01:33:25 -0800 2008

    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)

    pabloq Thu Dec 25 09:19:17 -0800 2008

    Hi, I’m newbie using git, it is not working for me…

    http://pabloq.github.com/

    does anyone know why???

    Thanks

    marcric Sat Dec 27 04:38:55 -0800 2008

    Well, I couldn’t get it working…

    http://github.com/marcric/marcric.github.com/tree/master

    If someone could help?

    pabloq Sun Dec 28 18:25:39 -0800 2008

    cool it’s working now :D

    joelmccracken Mon Jan 12 06:10:56 -0800 2009

    Any idea how to use latex with jekyll?

    chris Tue Jan 13 21:16:37 -0800 2009

    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.

    chris Tue Jan 13 23:08:45 -0800 2009

    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.

    nruth Wed Jan 21 20:18:59 -0800 2009

    It would be nice if I could write a static 1 page site in markdown. Any pointers?

    kangster Tue Jan 27 19:40:34 -0800 2009
    softprops Sat Jan 31 17:06:27 -0800 2009

    Oh @defunkt… If only flickr had a photo as awesome to match my username. What luck you have

    jmoeller Mon Feb 02 13:00:11 -0800 2009

    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?

    tumashu Sun Mar 29 03:54:53 -0700 2009

    MY God, it is not working for me…why ? http://tumashu.github.com If someone could help?

    thruflo Sun Mar 29 05:12:38 -0700 2009

    One more for the list: http://thruflo.github.com

    massa Wed Apr 08 04:11:18 -0700 2009

    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?

    samnardoni Wed Apr 29 10:05:52 -0700 2009

    Would this be easy to set up on a private server using git hooks? I'm looking at you, post-update...

    tschaub Sat Jun 06 18:06:47 -0700 2009

    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.

    stockrt Tue Jun 30 18:40:52 -0700 2009

    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

    lemojhon Sat Jul 25 22:41:24 -0700 2009

    It seems hyphens may also be an issue health fittness I just tried making a site for one of my repositories at http://sebnow.github.com/packagemanager-framework . As far as I can tell I have everything setup properly (there's an index.html file, branch is 'gh-pages'). I noticed it says generating the site can take up to 10 minutes, but it's been 25 minutes already.

    sd-fritze Sun Aug 30 09:31:13 -0700 2009

    Hmm. Tried to create a GitHub page, but it seems it doesnt like a dash in my username!
    Or did I do something wrong?
    Please Check!

    samueljaxon Mon Sep 21 06:28:34 -0700 2009

    I must say, very helpful guidelines about GitHub pages. Thanks.
    Buy essays | buy term papers | buy research papers

    AnnaLee Fri Oct 02 01:12:35 -0700 2009

    Thanks, because you spread facts about GitHub Pages. Buy an essay or custom written essays when you would like to know much more!

    JuliaAidan Tue Oct 13 03:23:25 -0700 2009

    Cool! I love the ability to create a blog. Was wondering whether I change the name to something else other than my name?
    Master Cleanse

    roger89 Fri Oct 16 22:14:17 -0700 2009

    Thanks for providing this wonderful service.. I am really happy to find this service..

    Wedding Dresses - Wedding dresses 2010
    Best Vera Wang wedding dresses
    Recommended Mori Lee prom dresses
    Evening dresses

    charlesmarshall Tue Oct 20 10:53:39 -0700 2009

    Hi, I have just moved mne over (http://charlesmarshall.co.uk) ..

    I noticed on a the gitready they've managed to get 301 redirects working, but doesnt seem to like doing it on mine, is there some sort of setting that needs to be turned on?

    james123 Wed Oct 28 16:06:42 -0700 2009
    technex Sun Nov 01 13:49:07 -0800 2009

    Try this: Premature Ejaculation Pills Great site about enlarge Penis !

    appointmentplus Fri Nov 06 00:17:03 -0800 2009

    Awesome! Some really helpful information in there. Bookmarked. Excellent source.
    online appointment scheduler

    Please log in to comment.