Technical Thoughts musings on technology


Back

Learning Jekyll

Written by Ryan Moore on 14 May 2014

When I first started using Jekyll to create this blog I didn't really run into any problems. It was only when I decided to deploy it to Github Pages that I ran into problems. Turns out that the library that Jekyll ships with by default to compile markdown is old and not maintained anymore. It was an easy fix. Just had to add this to my _config.yml file:

 
markdown: kramdown

Github notified me of this issue via email which made it easy to diganose and fix. The second issue that I ran into was when using haml for the index page. It appears that even with the haml plugin installed for Jekyll, Github didn't want to display it. As soon as I changed the index file back to index.html Github Pages picked up the blog and started to display it.

I've also run into some interesting issues when trying to use the code highlighting tools in Jekyll. The default provider works well enough, and I'm able to get the html formatted correctly. The issue I've ran into is with the styling. If you read the documentation on the Jekyll site for setting up the highlighter it points you to using a stylesheet available on Github. This works for some languages. For this post I found that the stylesheet that it points to does not have styles for YAML. I added the following styles so that at the very least the YAML above is colored:

.highlight .l-Scalar-Plain { color: #008080 }
.highlight .p-Indicator { font-weight: bold }

Thankfully the CSS highlighting worked without me having to do anything! I'm happy with the results so far. I'm sure that I'll find more issues as I use more of the system. Thankfully most of the issues have been pretty easy to solve.

comments powered by Disqus