More on blogging with Jekyll

Like any other technology, learning Jekyll is time consuming and sometimes frustrating to get things to work as you want. On the other hand, there are themes and various helpers to jump-start you into something quickly.

Once it is set up to your satisfaction, it’s fairly easy to add posts and update. It’s probably best to have some web knowledge, but there are instructions online on how to make it more automated. It’s not rocket-science, but it’s not as easy as just logging into “Blogger” or some other online pre-made tool.

I spent a lot of time working on the “Archive” page, to get the categories and tags to display how I might like them. Sometimes commands don’t work the way I think they should, but ultimately there’s a way. I need to make more adjustments, but I think it’s pretty good.

One challenge tonight was trying to look up an element from one list in another list, all using Liquid. This allows me to determine if a tag is already used as a category. I could seem to do this with “if contains”, but I found an alternative at this site, at the bottom of the page.

Now if I find a match, I turn the tag into a link.

{% assign linky = false %}
{% for t in site.categories %}
{% if t == tag %}
  {% assign linky = true %}
{% endif %}
{% endfor %}

<!--% if site.categories  contains tag | first %} -->
{% if linky %}

<a class="tag" href="/{{ tag | first | slugify }}/">
        {{ tag | first }}
</a>
...

(You can see in my comment what I had tried before – I tried with and without the “first”.)

Another challenge was the CSS, but that is not as interesting. :-)