-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.html
64 lines (61 loc) · 2.37 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: API Docs
---
{% assign sorted_collections = site.collections | sort: "position" %}
{% for collection in sorted_collections %}
{% assign sorted_docs = collection.docs | sort: "position" %}
{% for doc in sorted_docs %}
<section class="doc-content">
<section class="left-docs">
{% if forloop.first == true %}<h2>{{ collection.title }}</h2>{% endif %}
<h3>
<a id="{{ doc.collection }}_{{doc.title | slugify }}">
{{ doc.title }}
{% if doc.type %}<span class="endpoint {{ doc.type }}"></span>{% endif %}
{% if doc.required %}<span class="required"></span>{% endif %}
</a>
</h3>
{% if doc.description %}
<p>{{ doc.description | markdownify }}</p>
{% endif %}
{% if doc.endpoint %}
<p class="endpoint-url">{{ doc.endpoint }}</p>
{% endif %}
{% if doc.parameters and doc.parameters[0].name %}
<h4 class="parameters-title">Parameters</h4>
<ul class="parent-parameters">
{% for parameter in doc.parameters %}
<li class="parent">
<p class="parameter-name">{{ parameter.name }}{% if parameter.required %}<span class="reqd">required</span>{% endif %}</p>
<p class="parameter-desc">{{ parameter.content | markdownify | remove: '<p>' | remove: '</p>' }}</p>
{% if parameter.sub-fields %}
<ul class="child-parameters">
{% for field in parameter.sub-fields %}
<li class="child">
<p class="parameter-name">{{ field.name }}{% if field.required %}<span class="reqd">required</span>{% endif %}</p>
<p class="parameter-desc">{{ field.content | markdownify | remove: '<p>' | remove: '</p>' }}</p>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% 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 %}