summaryrefslogtreecommitdiffhomepage
path: root/website/_layouts/docs.html
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-12 12:55:23 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-12 12:55:23 -0700
commita3f97a757a8d6e18f03acecb68b484cc1608c3ae (patch)
tree293c51eb9786bc1b8371daaeec2985b17b5b3ec9 /website/_layouts/docs.html
parent6a4466a46cd551825198fbafc3b734ab5608019a (diff)
parent5f3a256425f4fa99fd3e5363418c5978659cecf3 (diff)
Merge pull request #2513 from amscanne:website-integrated
PiperOrigin-RevId: 311184385
Diffstat (limited to 'website/_layouts/docs.html')
-rw-r--r--website/_layouts/docs.html57
1 files changed, 57 insertions, 0 deletions
diff --git a/website/_layouts/docs.html b/website/_layouts/docs.html
new file mode 100644
index 000000000..e11492915
--- /dev/null
+++ b/website/_layouts/docs.html
@@ -0,0 +1,57 @@
+---
+layout: base
+categories:
+ - Project
+ - User Guide
+ - Architecture Guide
+ - Compatibility
+---
+
+<div class="container">
+ <div class="row">
+ <div class="col-md-3">
+ <nav class="sidebar" id="sidebar-nav">
+ {% for category in layout.categories %}
+ <h3>{{ category }}</h3>
+ <ul class="sidebar-nav">
+ {% assign sorted_pages = site.pages | where: 'layout', 'docs' | where: 'category', category | sort: 'weight' | sort: 'subcategory' %}
+ {% assign subcategory = nil %}
+ {% for p in sorted_pages %}
+ {% if p.subcategory != subcategory %}
+ {% if subcategory != nil %}
+ </ul>
+ </li>
+ {% endif %}
+ {% assign subcategory = p.subcategory %}
+ {% if subcategory != nil %}
+ {% assign ac = "aria-controls" %}
+ {% assign cid = p.category | remove: " " | downcase %}
+ {% assign sid = p.subcategory | remove: " " | downcase %}
+ <li>
+ <a class="sidebar-nav-heading" data-toggle="collapse" href="#{{ cid }}-{{ sid }}" aria-expanded="false" {{ ac }}="{{ cid }}-{{ sid }}">{{ subcategory }}<span class="caret"></span></a>
+ <ul class="collapse sidebar-nav sidebar-submenu" id="{{ cid }}-{{ sid }}">
+ {% endif %}
+ {% endif %}
+ <li><a href="{{ p.url }}">{{ p.title }}</a></li>
+ {% endfor %}
+ {% if subcategory != nil %}
+ </ul>
+ </li>
+ {% endif %}
+ </ul>
+ {% endfor %}
+ </nav>
+ </div>
+
+ <div class="col-md-9">
+ <h1>{{ page.title }}</h1>
+ {% if page.editpath %}
+ <p>
+ <a href="https://github.com/google/gvisor/edit/master/content/{{page.editpath}}" target="_blank"><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"><i class="fab fa-github fa-fw"></i> Create issue</a>
+ </p>
+ {% endif %}
+ {{ content }}
+ </div>
+ </div>
+</div>