Use this Gemfile with bundler to quickly setup Jekyll for use with Github Pages and optionally Travis-CI
curl -O https://gist.githubusercontent.com/mdrmike/f59b3c92d0c403285cd3/raw/dee8f1de2b1ce312b357478974806a6cab5b9fbe/Gemfile
- Setup a new Jekyll website
- Add this Gemfile to the (root of the) website
- Run
bundle install
to have Bundler install gems for github pages
These commands will create a new Jekyll website called j.demo
. Copy and paste the first line in a terminal, and optionally modify the SITE variable to your liking. Then copy, paste, and run the rest of the commands.
SITE=j.demo # URL or directory for Jekyll
mkdir -p ~/www/ # Make www folder if needed
jekyll new ~/www/${SITE} # Create new Jekyll site
cd ~/www/${SITE} # CD folders into new site
# Download Gemfile (next line)
curl -O https://gist.githubusercontent.com/mdrmike/f59b3c92d0c403285cd3/raw/dee8f1de2b1ce312b357478974806a6cab5b9fbe/Gemfile
bundle install # Use [Bundler](http://bundler.io/) to setup exactly same as Github Production
atom . # Open Atom.io editor (optional)
bundle exec jekyll serve # Start Jekyll internal webserver (optional)
You'll need to modify _config.yml
and template files in _layouts
per these instructions.
_config.yml
github:
url: "YOURURL"
_includes/YOURFILE
<!-- Useful for styles with static names... -->
<link href="{{ site.github.url }}/path/to/css.css" rel="stylesheet">
<!-- and for documents/pages whose URL's can change... -->
<a href="{{ page.url | prepend: site.github.url }}">{{ page.title }}</a>
Similar to above, these commands will cleanup the site.
SITE=j.demo # URL or directory for Jekyll
cd && rm -Rf ~/www/${SITE} #jekyll #destroy-website #talk-jekyll