Skip to content

Instantly share code, notes, and snippets.

@mrmartineau
Created January 20, 2017 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmartineau/8919159d58818c8530d516d118c3b838 to your computer and use it in GitHub Desktop.
Save mrmartineau/8919159d58818c8530d516d118c3b838 to your computer and use it in GitHub Desktop.
From my blog post: Creating dynamic layouts with Jekyll Raw
<section class="section{%if include.spaced %} section--spaced{% endif %}{%if include.padded %} section--padded{% endif %}{%if include.classes %} {{ include.classes }}{% endif %}{%if include.centred %} section--centred{% endif %}" style="{%if include.color %}color: {{ include.color }};{% endif %}{%if include.bgcolor %}background-color: {{ include.bgcolor }};{% endif %}">
<div class="l-container{%if include.size %} l-container--{{ include.size }}{% endif %}">
{% if include.title %}
<h3 class="h3">{{ include.title }}</h3>
{% endif%}
{{ include.body | markdownify }}
{% if include.link %}
<a href="{{ include.href }}" rel="external">{{ include.link }}</a>
{% endif %}
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment