jekyll/index.html (52 lines of code) (raw):
---
title: Happy Pi Day!
---
<div id="react-root"></div>
{% assign sorted_collections = site.collections | sort: "position_number" %}
{% for collection in sorted_collections %}
{% assign sorted_docs = collection.docs | sort: "position_number" %}
{% for doc in sorted_docs %}
<section class="doc-content" data-doc-id="{{ doc.id | replace: '/', '' | replace: '.', '' }}">
<section class="left-docs">
<h3>
<a id="{{ doc.id | replace: '/', '' | replace: '.', '' }}">
{{ doc.title }}
{% if doc.type %}
<span class="endpoint {{ doc.type }}"></span>
{% endif %}
</a>
<a class="editor-link" href="cloudcannon:collections/{{ doc.relative_path }}">Edit</a>
</h3>
{% if doc.description %}
<p class="description">{{ doc.description }}</p>
{% endif %}
{% if doc.parameters and doc.parameters[0].name %}
<h6>Parameters</h6>
<dl>
{% for parameter in doc.parameters %}
<dt>{{ parameter.name }}</dt>
<dd>{{ parameter.content }}</dd>
{% endfor %}
</dl>
{% endif %}
{{ doc.content | markdownify | replace: "<dl>", "<h6>Parameters</h6><dl>" }}
{% if doc.left_code_blocks and doc.left_code_blocks[0].code_block %}
<div class="code-viewer">
{% for block in doc.left_code_blocks %}
{% include syntax-highlight.html block=block %}
{% endfor %}
</div>
{% endif %}
</section>
{% if doc.right_code_blocks and doc.right_code_blocks[0].code_block %}
<section class="right-code">
<div class="code-viewer">
{% for block in doc.right_code_blocks %}
{% include syntax-highlight.html block=block %}
{% endfor %}
</div>
</section>
{% endif %}
</section>
{% endfor %}
{% endfor %}