user75454 user75454 - 6 months ago 47
Ruby Question

Two column Jekyll layout, separated by tags?

I'm currently working on a Jekyll blog at the moment, and I'd like to put my markdown files in this format:

<div class="row">
<div class="col-md-6">

</div>
<div class="col-md-6">

</div>
</div>


I want my code blocks in one column and everything else (text, headers, etc.) in the other column so that I have side-by-side explanations of my code.

Is there any way to do this? It seems Markdown and the Liquid templating engine is very restrictive in this regard.

Thanks!

Answer

Short answer is NO, markdown is limited format and you can get full features here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet .

In regards to Liquid, I think it has nothing to do with fronted layout style. It is just backend technology to organize your view layout.

Sure you can use HTML in markdown and that solves the thing :)

Note that markdown wrapped in html tags will not work for example:

<div style="color: red">

## What I would do if I had another chance?
aaa

</div>

The code above will not render header properly, however if you will use Liquid instead like this:

<div style="color: red">
{{ content }}
</div>

Include content using Liquid templating engine and write markdown there, it will be processed properly.

Comments