avatar

About me:

I am a .Net developer by day and a bookworm by night. My wife, Collin, is a starving artist and is designing a board game. We have two cats named Katy and Lottie, they're tuxedo cats so they are always dressed for formal affairs.

Sorry, I am not for hire.

rss RSS feed

Links in Jekyll.

If you read my post “Jekyll can be tricky business”, then you probably noticed a broken link in my list. After a few trial-and-error tests, I’ve determined that Jekyll does not process links in HTML lists.

A demonstration:

YAML code snippet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
layout: post
title: "Jekyll links example."
date: 2013-09-08
---
 
For more woeful tales of Jekyll, refer to my [Github Page][link-name].
 
Let's reference the same link to my Github page, but in an unordered list:
<ul>
<li>[Github Page][link-name]</li>
</ul>
 
One more time but in an ordered list:
<ol>
<li>[Github Page][link-name]</li>
</ol>
 
[link-name]: campbeja.github.io

Output:

For more woeful tales of Jekyll, refer to my Github Page.

Let’s reference the same link to my Github page, but in an unordered list:

  • [Github Page][link-name]

One more time but in an ordered list:

  1. [Github Page][link-name]

Jekyll can be tricky business.

When I found out that Github was hosting pages, I wanted to create a page of my own so my place on Github would be more than numbers and commit histories. Blogging is not really an interest of mine but I do try to keep track of what I’ve learned and there’s so much happening in the programming industry that it is difficult to keep track. I definitely don’t want to write a new .html file every time I had something to say, so I started looking into content management systems. I’ve worked with Wordpress and Joomla in the past, but Github pages do not support those and their documentation pointed me to Jekyll.

Setting up my Jekyll blog was not a simple task for a few reasons:

  1. Jekyll requires Ruby. Ruby doesn’t play nice with Windows, which is the only brand of operating system that I use daily.
  2. If you want syntax highlighting for code snippets, you will need to install Pygments. However, in my case, Pygments kept breaking Jekyll. After a couple weekends of searching, I still had no solution and chose to just discard it.
  3. Jekyll doesn’t support blog tags, not really. You can add a tag attribute to a post but Jekyll does nothing to link common tags.

The first two issues are not fresh enough in my mind to clarify further but I can elaborate on implementing tags in Jekyll. I followed Charlie Park’s instructions in “Tags in Jekyll” and was able to display tags as links to related posts on localhost… and only localhost. Github pages do not support Jekyll plugins so pages of posts by tag are not generated on the Github server.

I do not have a true solution for this issue. For now, I just build this blog locally and then copy the generated tag pages to the root directory and publish the changes. It’s not ideal but it still beats writing these pages by hand.