2019-11-18 13:40:27 -08:00
|
|
|
---
|
|
|
|
|
layout: base
|
|
|
|
|
categories:
|
|
|
|
|
- Project
|
|
|
|
|
- User Guide
|
|
|
|
|
- Architecture Guide
|
|
|
|
|
- Compatibility
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-3">
|
2020-04-27 22:24:58 -07:00
|
|
|
<nav class="sidebar" id="sidebar-nav">
|
2019-11-18 13:40:27 -08:00
|
|
|
{% for category in layout.categories %}
|
|
|
|
|
<h3>{{ category }}</h3>
|
|
|
|
|
<ul class="sidebar-nav">
|
2020-08-04 01:05:42 -07:00
|
|
|
{% assign subcats = site.pages | where: 'layout', 'docs' | where: 'category', category | group_by: 'subcategory' | sort: 'name', 'first' %}
|
|
|
|
|
{% for subcategory in subcats %}
|
2021-01-12 17:50:33 -08:00
|
|
|
{% assign sorted_pages = subcategory.items | where: 'include_in_menu', true | sort: 'weight', 'last' %}
|
|
|
|
|
{% comment %}If all pages in the subcategory are excluded don't show it.{% endcomment %}
|
|
|
|
|
{% if sorted_pages.size > 0 %}
|
|
|
|
|
{% if subcategory.name != "" %}
|
|
|
|
|
{% assign cid = category | remove: " " | downcase %}
|
|
|
|
|
{% assign sid = subcategory.name | remove: " " | downcase %}
|
|
|
|
|
<li>
|
2021-03-24 17:54:45 -07:00
|
|
|
{% comment %}
|
|
|
|
|
If the current page is in the sub-category then set the collapsible to expanded.
|
|
|
|
|
See: https://getbootstrap.com/docs/3.3/javascript/#collapse
|
|
|
|
|
{% endcomment %}
|
|
|
|
|
{% assign expanded = false %}
|
|
|
|
|
{% for p in sorted_pages %}{% if page.url == p.url %}{% assign expanded = true %}{% endif %}{% endfor %}
|
|
|
|
|
<a class="sidebar-nav-heading" data-toggle="collapse" href="#{{ cid }}-{{ sid }}" {% if expanded %}aria-expanded="true"{% else %}aria-expanded="false"{% endif %} aria-controls="{{ cid }}-{{ sid }}">{{ subcategory.name }}<span class="caret"></span></a>
|
|
|
|
|
<ul class="collapse{% if expanded %} in{% endif %} sidebar-nav sidebar-submenu" id="{{ cid }}-{{ sid }}">
|
2021-01-12 17:50:33 -08:00
|
|
|
{% endif %}
|
|
|
|
|
{% for p in sorted_pages %}
|
2021-03-24 17:54:45 -07:00
|
|
|
<li{% if page.url == p.url %} class="active"{% endif %}><a href="{{ p.url }}">{{ p.title }}</a></li>
|
2021-01-12 17:50:33 -08:00
|
|
|
{% endfor %}
|
|
|
|
|
{% if subcategory.name != "" %}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{% endif %}
|
2020-08-04 01:05:42 -07:00
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
2019-11-18 13:40:27 -08:00
|
|
|
</ul>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
<h1>{{ page.title }}</h1>
|
2020-04-27 22:24:58 -07:00
|
|
|
{% if page.editpath %}
|
2019-11-18 13:40:27 -08:00
|
|
|
<p>
|
2020-07-17 18:26:08 -07:00
|
|
|
<a href="https://github.com/google/gvisor/edit/master/{{page.editpath}}" target="_blank" rel="noopener"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
|
|
|
|
<a href="https://github.com/google/gvisor/issues/new?title={{page.title | url_encode}}" target="_blank" rel="noopener"><i class="fab fa-github fa-fw"></i> Create issue</a>
|
2019-11-18 13:40:27 -08:00
|
|
|
</p>
|
|
|
|
|
{% endif %}
|
2020-05-15 20:03:54 -07:00
|
|
|
<div class="docs-content">
|
2019-11-18 13:40:27 -08:00
|
|
|
{{ content }}
|
2020-05-15 20:03:54 -07:00
|
|
|
</div>
|
2019-11-18 13:40:27 -08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|