Collaboration!

When I started looking at a static site, I first poked at Jekyll. I found a basic theme that I like. It had a bit of a failing though - there was an issue if I had the site in a subdirectory (like timatlee.com/blog/), the navigation links at the top of the header wouldn't work.

It seemed like there was an assumption that the site would always be at the domain root, which in my case, turns out isn't the case.

The local fix was easy:

  • Create an _includes folder in the root of my Jekyll source folder
  • Add a file called nav.html. Copy the content of the existing nav.html, which I grabbed from the theme's author's github site.
  • Update the line containing {% raw %}{{ link.url }}{% endraw %} to be {% raw %}{{ link.url | prepend:site.baseurl }}{% endraw %}.

Well, that's easy.. might as well contribute that back to the author, right?

And so, my second ever github PR was merged into "production", marking my first successful PR.

I feel so proud.

It wasn't until after the PR was merged, that I realised that links to external sites are broken when the prepend:site.baseurl bit.. oh well, fix that another day.