Created
January 27, 2016 12:30
-
-
Save timwis/8de5cf19692a46279f3f to your computer and use it in GitHub Desktop.
How to use rows and columns in a Jekyll page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It currently injects
<br />
tags before and after each line since it parses the markdown first. Any thoughts on how to get around that?