Skip to content

Instantly share code, notes, and snippets.

@timwis
Created January 27, 2016 12:30
Show Gist options
  • Select an option

  • Save timwis/8de5cf19692a46279f3f to your computer and use it in GitHub Desktop.

Select an option

Save timwis/8de5cf19692a46279f3f to your computer and use it in GitHub Desktop.
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

timwis commented Jan 27, 2016

Copy link
Copy Markdown
Author

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