How to do some things in Jekyll

As of Feb 2015 I discovered Jekyll and this has rocked my world. Beautifully done. No more Word-Press for me !!!

Install on OSX

sudo gem install jekyll

Making posts and pages

To make a blog post, the file needs to start with this yaml front matter

layout: page
title: "example user file"
category: post
date: 2015-01-30 22:01:06

To make a new page the starting yaml front matter looks like

layout: page
title: "Opening and Closing Igor Pro"
category: gettingstarted
date: 2015-01-30 22:38:12
order: 3

Reference links look like this

This links to [Jekyll front-matter page][1]
This links to [Daring Fireball][2]

[1]: "Jekyll Front-Matter"
[2]: "Markdown Bascis"

I edited _config.yml like this

# Dates are not included in permalinks
#permalink: none
permalink: /:title

I do not need to add anyhting special to my yaml frontmatter!

And now this works as link to stack this works as link to stack

this also works, [Link to stack page][3]
[4]: /Vascular-Analysis/stack/ "stack"

this also works, Link to stack page

On the mac

I am keeping my local Jekyll sites in /Users/cudmore/Sites/Vascular-Analysis

To run Jekyll on a Mac,

cd /Users/cudmore/Sites/Vascular-Analysis
jekyll serve --watch

View the site locally with


View the site on Github

Embed video

<iframe width="560" height="315" src="" frameborder="0"> </iframe>

Convert markdown to pdf

cd /Users/cudmore/Sites/Vascular-Analysis/_posts
//with TOC
gimli -y -m -s ../css/main.css -w ‘–toc –footer-right “[page]/[toPage]”’ -o pdf
//without toc, -w is passing commands to backend wkhtmltopdf
gimli -y -m -s ../css/main.css -w ‘–footer-right “[page]/[toPage]”’ -o pdf

gimli -y -m -s ../css/main.css -w ‘–footer-right “[page]/[toPage]”’ -o ../pdf
gimli -y -m -s ../css/main.css -w ‘–header-left “[webpage]” –header-right “[page]/[toPage]”’ -o ../pdf

gimli -y -f ./ -s ../css/main.css -w ‘–page-size “letter” –footer-right “[page]/[toPage]”’ -o ../pdf/

-y to remove yaml
-f to specify a file -s to specify a .css file

Check page load speed

Started using imageoptim-cli

This doesn’t work because jpegmini is not configured properly

imageoptim –jpeg-mini –image-alpha –quit –no-color –directory /Users/cudmore/Sites/Vascular-Analysis/images

This does work

imageoptim –image-alpha –quit –no-color –directory /Users/cudmore/Sites/Vascular-Analysis/images

Adding a tag cloud

This worked

And is inspied on this:

  1. make and fill in tags.html in /Vascular-Analysis/
  2. create and fill in _includes/post-tags.html
  3. include it in this file _layouts/post.html with

{.% include post-tags.html .%}
remove the .’s

  1. edit and add to styles.css
  2. include some tags in each post with

layout: post
title: This is an example.
- jekyll
- example
published: true

Now get rid of all this in /Vascular-Analysis/, it is redundant with the left TOC.
And add it to /blog/. Then rewrite post-tags.html as i like and include it in a sidebar like i did in post.html