Tagging the thoughts
• Mark Eschbach
So this is great so far. Fairly easy to get up and running. I kind of expected there to be a built in tool for creating new blog entries…but hey; can’t have everything I suppose. The date is the only tedious part anyway.
The next goal I have is to get a tagging system operational. Categories work to a certian extent, but they seem their expression out of the box seemed to describe a hierarchial tree as opposed to inclusion of a series of sets.
On to the search
The first google hit suprisingly turned up zilch for an internal way, but dated 2011-07-07. Charlie Park states this isn’t possible out of the box; seems about right from what I’ve seen so far. He does provide a techinque to do so however I would rather continue searching and find a hidden gem.
Next up on the list was minddust’s how to dated 2014-08-03. Interestingly there is a not about a dry solution. Let’s glance th article first. He goes over a method of accomplishing the indexing…
I next found a similar mechanism on Vitaly Repin’s How to implement proper blog tagging with Jekyll. Being lazy, I think I’ll go back and look at Charlie Park’s github link. Hopefully that is a plugin I can use. Nope, just a link to his Github Pages site. Hmm; back to Vitaly’s implementation.
So under Goal #2 they expect a single entry per page…I wonder if I can rig it otherwise; but let’s try what there first. Dropped in the initial implementation on the index.md
file and that was really easy. Nope, I was wrong. That actually worked out decently well.
Clean up
So in the current spike I need to add the tags themselves to teh articles and make them link to something. Putting a slugified link on the index page where I have the tags right now makes sense. Eventually I’ll have to pull them because they’ll become really long though. First step, adding the links ot the articles. Back to _layouts/post.html
! In goal #3 they do the same thing, so score! Well kind of anyway. Sigh.
Well, getting it in the post was kind of fruitless. Maybe I need to restart it? Looks like the _layouts/post.html
wasn’t really updating. Maybe it was? The _layouts/home.html
seems to do update without restarting.
Moving on, it looks like they key is the capture
element. Liquid seems to classify it under Variable Tags. Liquid is the underlying template technology, so I’m not sure my jekyll capture
search was too successful. Uh, nope. Apparently it captures the output of the string. Well, that wasn’t what I expected.
Digging Deeper
Hmm, after looking a little closer at the current _layouts/post.hml
there are a lot of refs to page
. I’m gonna assume page
contains a parsed ref to the header of the rendering file…hey! It works. Now to properly render the content. Derp. Processing instructions use {%
. Well that was relatively easy.