How can I adapt my current two-column (using Bootstrap) ordered list in a Jekyll site? The goal is to have Jekyll take my .md file, of ordered list items and split it into two columns. I currently have to individually edit each ordered list in the two columns which will be problematic in the long run, as this document is updated and added to constantly.
Here is my current code:
<!-- Left Column -->
<div class="col-sm">
<ol>
<li>Zebras</li>
<li>Lions</li>
</ol>
</div>
<!-- Right Column -->
<div class="col-sm">
<ol start="3">
<li>Zebras</li>
<li>Lions</li>
</ol>
</div>
Here is a visual of what I would like to accomplish via Jekyll.
Input (Markdown file):
---
layout: default
---
1. Zebras
2. Lions
3. Tigers
4. Gorillas
Ideally, this would then be parsed into:
1. Zebras 3. Tigers
2. Lions 4. Gorillas
I found two on-topic StackOverflow questions, however, neither fit this use case. The first uses YAML front-matter to build the list. However, since I often have links in my ordered list, I do not think this method would work—also, would be equally as tedious as adding each list item. The second gets closer, however, I think it is using the post files whereas I am using list items.
Can I have Jekyll take the number of ordered list items, split those in half (or if not exact, the left column should be greater than the right), then put the list items in their respective columns? Finally, carrying over the counter from the left column (either using <ol start="x">
or something else).
` and use a media break to change the column-count it works perfectly!!
– jelias Jan 20 '18 at 02:36