Skip to content

Instantly share code, notes, and snippets.

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

{
"card_list": [
{
"type": "Deck",
"deckClass": "application",
"manifestURL": "app://app-deck.gaiamobile.org/manifest.webapp",
"group": "app"
},
{
"type": "Deck",
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@begeeben
begeeben / touch-button.js
Last active December 11, 2015 04:28 — forked from phoboslab/touch-button.js
Made touch-button able to take different size buttons in one sprite sheet.
ig.module(
'plugins.touch-button'
)
.requires(
'impact.system',
'impact.input',
'impact.image'
)
.defines(function(){
// A Button Entity for Impact.js
ig.module( 'plugins.button' )
.requires(
'impact.entity'
)
.defines(function() {
Button = ig.Entity.extend({
size: { x: 80, y: 40 },