Hosting the visualization with GitHub Pages
In the previous section, we created a web application using Jekyll, Backbone, and D3. With Jekyll, we created a template for the main page and included the minified JavaScript libraries and styles. With Jekyll, we can compile the markup files to generate a static website or serve the site without generating a static version using jekyll serve
. In this section, we will publish our site using GitHub Pages, a hosting service for personal and project sites.
GitHub Pages is a service from GitHub that provides hosting for static websites created in Jekyll or HTML. To publish our Jekyll site, we need to create a branch named gh-pages
and push the branch to GitHub. If this branch is a Jekyll project or contains an index.html
file, GitHub will serve the content of this branch as a static site. We can create the branch from the master branch:
$ git checkout -b gh-pages
Next, push the branch to our origin, the GitHub endpoint:
$ git push -u origin gh-pages...