summaryrefslogtreecommitdiffhomepage
path: root/website/content/_layouts
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-11-18 13:40:27 -0800
committerAdin Scannell <ascannell@google.com>2020-04-21 12:00:59 -0700
commit957e26a6f30d40e2bff042d76a327d0a2cfbabae (patch)
tree3e95d46355585ae4661de5cef30cdca72a7c94bb /website/content/_layouts
parentdc2f198866c5fd8162a79978eb3633975d3ba11f (diff)
Move website to a simpler jekyll-based template
This will allow us to merge the site into the main repository. This merge allows the documentation to be kept up-to-date and synchronized with the main project. Builds will be triggered on any update, removing the need for the cron-based reploy.
Diffstat (limited to 'website/content/_layouts')
-rwxr-xr-xwebsite/content/_layouts/base.html9
-rwxr-xr-xwebsite/content/_layouts/blog.html17
-rwxr-xr-xwebsite/content/_layouts/default.html14
-rwxr-xr-xwebsite/content/_layouts/docs.html55
-rwxr-xr-xwebsite/content/_layouts/post.html10
5 files changed, 105 insertions, 0 deletions
diff --git a/website/content/_layouts/base.html b/website/content/_layouts/base.html
new file mode 100755
index 000000000..b30bee0dc
--- /dev/null
+++ b/website/content/_layouts/base.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html lang="en" itemscope itemtype="https://schema.org/WebPage">
+ {% include header.html %}
+ <body>
+ {% include header-links.html %}
+ {{ content }}
+ {% include footer.html %}
+ </body>
+</html>
diff --git a/website/content/_layouts/blog.html b/website/content/_layouts/blog.html
new file mode 100755
index 000000000..a7f972289
--- /dev/null
+++ b/website/content/_layouts/blog.html
@@ -0,0 +1,17 @@
+---
+layout: base
+---
+
+<div class="container">
+ <div class="row">
+ <div class="col-md-9">
+ <h1>{{ page.title }}</h1>
+ {{ content }}
+ </div>
+
+ <div class="col-md-3">
+ <h2>Archive</h2>
+ <p>Looking for older posts? See the full <a href="/blog/archive/">archive</a>.</p>
+ </div>
+ </div>
+</div>
diff --git a/website/content/_layouts/default.html b/website/content/_layouts/default.html
new file mode 100755
index 000000000..e5523e3fc
--- /dev/null
+++ b/website/content/_layouts/default.html
@@ -0,0 +1,14 @@
+---
+layout: base
+---
+{% if page.title %}
+<div class="container">
+ <div class="page-header">
+ <h1>{{ page.title }}</h1>
+ </div>
+</div>
+{% endif %}
+
+<div class="container">
+ {{ content }}
+</div>
diff --git a/website/content/_layouts/docs.html b/website/content/_layouts/docs.html
new file mode 100755
index 000000000..f6a278bf4
--- /dev/null
+++ b/website/content/_layouts/docs.html
@@ -0,0 +1,55 @@
+---
+layout: base
+categories:
+ - Project
+ - User Guide
+ - Architecture Guide
+ - Compatibility
+---
+
+<div class="container">
+ <div class="row">
+ <div class="col-md-3">
+ <nav class="sidebar collapse" 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' %}
+ {% 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 id = p.subcategory | remove: " " | downcase %}
+ <li>
+ <a class="sidebar-nav-heading" data-toggle="collapse" href="#{{ id }}" aria-expanded="false" aria-controls="{{ id }}">{{ subcategory }}<span class="caret"></span></a>
+ <ul class="collapse sidebar-nav sidebar-submenu" id="{{ id }}">
+ {% 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.noedit != true %}
+ <p>
+ <a href="https://github.com/google/gvisor/edit/master/website/content/{{page.path}}" 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>
diff --git a/website/content/_layouts/post.html b/website/content/_layouts/post.html
new file mode 100755
index 000000000..640bee5af
--- /dev/null
+++ b/website/content/_layouts/post.html
@@ -0,0 +1,10 @@
+---
+layout: blog
+---
+
+<div class="blog-meta">
+ {% include byline.html authors=page.authors date=page.date %}
+</div>
+<div class="blog-content">
+ {{ content }}
+</div>