m. c. de marco: To invent new life and new civilizations...

Restyled

A while back I blogged about needing to hack my recipes to add some metadata for better (i.e., Twitter-style) recipe links. It started bothering me again recently, and instead of hacking up a separate script, I hacked the Liquid in my aging Jekyll installation to add meta tags to each recipe page.

By the time Liquid was grabbing the metadata out of my markdown it was already converted to HTML, which simplified things and also inspired me to do some styling of the recipes that I’ve wanted to do for a while but wasn’t able to using just the basic Jekyll conversion to HTML. So now, if your screen is wide enough, the directions will appear in a second column next to the ingredients, which makes them much easier to use. I also Liquidified the fraction typesetting beyond what was partially and mysteriously done by rdiscount’s smartypants.

I had to edit a bunch of recipes that didn’t have the usual structure (of intro, ingredients, directions, and variants) to make them look okay in the new layout. I touched up a few images while I was at it (but the recipe collection still needs a lot more photography, including some that I’ve taken but not uploaded yet). If you’re curious about the new Liquid, it’s in two files of my website configuration, layout.html (for the metadata) and recipe.html (for the layout wrapper divs and fractions). Once the appropriate HTML wrappers are inserted, the layout is just basic flexbox CSS.

I also had to decide whether I wanted to go on hacking up a Jekyll 2.1.1 installation or move on to something current that can actually handle Markdown that’s not crufted up with redundant YAML. I looked at the new kids on the block, but once again decided that converting to something else (or more precisely, figuring out exactly what it is that I need to convert) is too much more work than just a little more Liquid and finger-crossing.