forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtree.html
More file actions
26 lines (24 loc) · 765 Bytes
/
tree.html
File metadata and controls
26 lines (24 loc) · 765 Bytes
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
{% for item in include.tree %}
{% if item.section %}
<div class="item" data-title="{{ item.title }}">
<div class="container">
{% include_cached tree.html tree=item.section %}
</div>
</div>
{% else %}
{% capture whitespace %}
{% if item.path %}
{% assign path = item.path %}
{% assign title = item.title %}
{% assign target = " target='_blank'" %}
{% else %}
{% assign page = site.pages | where: "path", item | first %}
{% assign title = page.title %}
{% assign path = page.url %}
{% endif %}
{% endcapture %}
{% if path %}
<a class="item" data-title="{{ title }}" href="{{ path }}"{{ target }}></a>
{% endif %}
{% endif %}
{% endfor %}