October 1, 2016

Static site gen madness

I razed old site and finally got around to using a static site generator, Jekyll which is pretty nifty but damn if it’s painful to get going on windows.

You have to do a few key things to get everything installed and the bundle working. The main thing is to Install ruby w/ chocolatey - make sure to run from ps admin shell. Following these instructions got me most of the way there. Installing Ruby manually caused various other problems I’ll spare.

First attempt of doing bundle exec jekyll serve complained about no repo or origin remote setup in the git repo, both of which was not true, but that was easily fixed by adding the following line to _config.yml :

# change appropriate to your repository
repository: dexterhaslem/dexterhaslem.github.io

Once that was done, trying bundle exec jekyll serve gave wacky SSL errors that didnt make sense because I was pushing to the repo with a key without issues. some searching around found this issue that gave me the key hint to get serving to work. I changed Gemfile to this (my entire file):

source "https://rubygems.org"
gem "minima"
# requires native build tools blah whatever
#gem "wdm", ">= 0.1.0" if Gem.win_platform?

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages" #, group: :jekyll_plugins

For some reason having the jekyll_plugins group caused the SSL error, commented that out and BAM! Static site generation. However the first go at the site being served looked awful and I realized it was trying to hit the configured url for spreadsheets, etc. Setting url in config.yml to (or whatever you’ve configured serve to use) will fix it.

jekyll site blab

Next post
TravisCI PostgreSQL flyway migrations This post is about using Travis CI to test a Java Spring Boot (or similar) project that uses PostgreSQL (or any other supported DB) with flyway