See our new Wiki!

This wiki is in legacy mode. Check our new wiki here!

Github Pages

Bootstrap integration

We have a project to easily integrate any Bootstrap theme with your GitHub Pages website. Check bootlaterus.gh-pages.

Testing a site locally

  • Install Ruby

  • Run the following commands to install the site:

    gem install bundler
    bundle install
    
  • Run this command to start the server:

    bundle exec jekyll serve
    

Deploying a folder using Travis CI

You can deploy any kind of web content to a GitHub Page using the following steps:

  1. Install Ruby!
  2. Create a Travis CI account and link your repo.
  3. Using an account with permissions to write in the repo create a GitHub Access Token https://github.com/settings/tokens
  4. Encrypt your token using locally on your machine the following commands:

     gem install travis
     travis encrypt GH_TOKEN="github-token" --add
    

    For more info you can check the section Permission to push on this article

  5. Create a .travis.yml file on your repo and customize it:

    • Travis CI - GitHub Pages docs: https://docs.travis-ci.com/user/deployment/pages/
    • Example to build using grunt and then deploy to GitHub Pages when a push is made to the master branch: open example

Updating Github Pages gem

Execute the following commands:

bundle update github-pages
bundle install

FAQ

  • My repo says that I have a vulnerability:
    • Update nokogiri to version >= 1.8.5 CVE-2018-14404
      • FIX: Update github.
  • What is the language that GitHub Pages uses?
    • It uses a template language called Liquid written in Ruby.

Equilaterus (CC-BY) 2018 - 2022.