---
layout: page
---

{% capture newline %}
{% endcapture %}

{% capture collection_root %}{% include page_root.liquid page=page %}{% endcapture %}

<h1 id="heading" class="ui dividing header">{{ page.title }}</h1>

{% if page.parent_layout %}
<div class="ui list">
  <div class="item">
    {% include icon.liquid id='flow-line' %}
    <div class="content">
      <div class="ui breadcrumb">
        <span class="section active">{{ page.title }}</span>
        {% for ancestor in page.parent_layout %}
        {% include icon.liquid id='chevron-right' class='divider' %}
        <a class="section" href="{{ site.baseurl | append: collection_root }}/{{ ancestor }}/#{{ collection_root }}/">{{ ancestor }}</a>
        {% endfor %}
      </div>
    </div>
  </div>
</div>
{% endif %}

<div class="ui basic segment"><span class="anchor" id="description">&nbsp;</span>
  {% assign lines = page.description | newline_to_br | split: '<br />' %}
  <p class="larger text">
  {{ lines.first | markdownify | remove: '<p>' | remove: '</p>' }}
  </p>

  {% assign description = "" | split: "" %}
  {% for line in lines offset:1 %}{% assign description = description | push: line %}{% endfor %}
  {{ description | join: newline | markdownify }}
</div>

<div class="ui basic segment">
<h2 id="usage" class="ui header">Usage</h2>

{% capture md %}
```yaml
---
layout: "{{ page.title }}"
{% if page.parameters %}
{% assign params = page.parameters | sort: 'name' -%}
{%- for p in params -%}
{{ p.name }}: {{ p.type }}
{% endfor -%}{%- endif -%}
---
<content>
```
{% endcapture %}
{{ md | markdownify }}
</div>

{% if page.parameters %}
<div class="ui basic segment">
<h2 id="parameters" class="ui header">Parameters</h2>

<table class="ui striped definition table"><tbody>
{% assign params = page.parameters | sort: 'name' %}
{% for p in params %}
  {% capture optional %}{% if p.optional %}<div class="ui horizontal label">optional</div>&nbsp;{% endif %}{% endcapture %}
  <tr><td class="collapsing"><code>{{ p.name }}</code></td><td>{{ optional }}{% if p.description %}{{ p.description | markdownify | remove: '<p>' | remove: '</p>' }}{% endif %}</td></tr>
{% endfor %}
</tbody></table>
{% endif %}

</div>
