Skip to content

Instantly share code, notes, and snippets.

@timwis timwis/default.html
Created Jan 27, 2016

Embed
What would you like to do?
How to use rows and columns in a Jekyll page
<!DOCTYPE html>
<html>
<body>
<div class="container">
{% assign rows = content | split:"@row" %}
{% for row in rows %}
<div class="row" id="row-{{ forloop.index }}">
{% assign columns = row | split:"@column" %}
{% for column in columns %}
<div class="col-sm-{{ 12 | divided_by:forloop.length }}">
{{ column }}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</body>
</html>
---
layout: default
---
First row, first column
@column
First row, second column
@column
First row, third column
@row
Second row, first column
@column
Second row, second column
@timwis

This comment has been minimized.

Copy link
Owner Author

commented Jan 27, 2016

It currently injects <br /> tags before and after each line since it parses the markdown first. Any thoughts on how to get around that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.