forked from CloudCannon/aviator-jekyll-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (47 loc) · 1.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: API Docs
---
{% 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">
<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_markdown | markdownify | replace: "<dl>", "<h6>Parameters</h6><dl>" }}
{% if doc.left_code_blocks and doc.left_code_blocks[0].code_block %}
{% for block in doc.left_code_blocks %}
{% include syntax-highlight.html block=block %}
{% endfor %}
{% endif %}
</section>
{% if doc.right_code_blocks and doc.right_code_blocks[0].code_block %}
<section class="right-code">
{% for block in doc.right_code_blocks %}
{% include syntax-highlight.html block=block %}
{% endfor %}
</section>
{% endif %}
</section>
{% endfor %}
{% endfor %}