{% set comma = joiner() %}
<h1 id="{{ getSafeId(title) }}">{{ title }} Documentation</h1>
<p>
{% if version %}<strong>version</strong> {{ version }}<br/>{% endif %}
{% if baseUri %}<strong>baseUri</strong> {{ baseUri }}<br/>{% endif %}
{% if protocols %}<strong>protocols</strong>
  {% for protocol in protocols -%}
    {{ comma() }} {{protocol}}
  {%- endfor %}
  <br/>
{% endif -%}
{% if mediaType %}<strong>mediaType</strong> {{ mediaType }}{% endif %}
</p>

{% for item in documentation %}
<h1 id="{{ getSafeId(item.title) }}">{{ item.title }}</h1>
<div class="set">
  <div class="set-description">
{% markdown %}
{{ item.content }}
{% endmarkdown %}
  </div>
</div>
{% endfor %}

{% include "./types.nunjucks" %}

{% for resource in resources %}
{% if resource.displayName %}
  <h1 id="{{ getSafeId(resource.displayName) }}">{{ resource.displayName }}</h1>
{% else %}
  <h1 id="{{ getSafeId(resource.relativeUri) }}">{{ resource.relativeUri }}</h1>
{% endif %}
<p>
  {% markdown -%}
    {{ resource.description }}
  {%- endmarkdown %}
</p>

{% include "./resource.nunjucks" %}

{% endfor %}
