Skip to content
Matthew R. edited this page Jul 20, 2015 · 3 revisions

If you have your code in a Github repository, there is a terrific feature that allows you to host your page for free. "Github Pages" gives you a URL where people can access the website and interact with it.

##Set up your repository

First create the branch where your hosted project will live. At the command line type: $ git checkout -b gh-pages

gh-pages is the branch that Github assigns a URL to, and this is where you will push your project to.

##Get your code ready

Our friend Gulp is going to help us get the site ready in a two step process.

###Step 1

At the command line run: $ gulp build. This runs a series of tasks that minimize your code and put it all into a small package that will run faster in the browser. It then puts that package into a folder in your repo called dist.

####Step 1.5

Before you push your code to the gh-pages branch, you need to make sure your data will go along with it. Copy the geodata folder to your new dist folder.

###Step 2

At the command line run: $ gulp deploy. This will push your new minified version, along with the geo data to the gh-pages branch. You now should be able to see your project at the URL http://[your-user-name].github.io/[repo-name]

####Home ####[What's this all about...](What's this all about...) ####[Getting Set Up](Getting Ungentry Set Up) ####[How to Help!](How to Help!) ####Deployment ####[Data Generation](Data Generation) ####[Development Resources](Development Resources)

Clone this wiki locally