Migrate website to Hugo

Signed-off-by: Luc Perkins <lucperkins@gmail.com>
This commit is contained in:
Luc Perkins
2018-05-14 12:18:32 -07:00
parent b511c397c3
commit d1503dc9ce
67 changed files with 236 additions and 241 deletions

5
docs/layouts/404.html Normal file
View File

@@ -0,0 +1,5 @@
{{ define "main" }}
<h2>
We're sorry, but this page could not be found. Return to the main site <a href="/">here</a>.
</h2>
{{ end }}

View File

@@ -0,0 +1,35 @@
{{- $prodSite := not .Site.IsServer -}}
{{- $faviconUrl := .Site.Params.favicon | absURL -}}
{{- $fontImport := .Site.Params.fontImport -}}
<!DOCTYPE html>
<html lang="{{ default "en" .Site.LanguageCode }}">
<head>
{{ .Hugo.Generator }}
{{- partial "meta.html" . }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{- partial "css.html" . }}
<link rel="icon" type="image/png" href="{{ $faviconUrl }}" sizes="16x16">
<link href="{{ $fontImport }}" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="hero">
{{- partial "navbar.html" . }}
{{- partial "definition.html" . }}
</div>
<div class="content">
<div class="wrapper-details">
{{ block "main" . }}
{{ end }}
</div>
</div>
</div>
{{- partial "footer.html" . }}
{{- partial "javascript.html" . }}
{{- if $prodSite }}
{{- partial "google-analytics.html" . }}
{{- end }}
</body>
</html>

View File

@@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

View File

@@ -0,0 +1,3 @@
{{ define "main" }}
<h1>This is a docs page</h1>
{{ end }}

3
docs/layouts/index.html Normal file
View File

@@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

View File

@@ -0,0 +1,4 @@
{{- $cssFiles := .Site.Params.css -}}
{{- range $cssFiles }}
<link rel="stylesheet" href="{{ printf "/css/%s.css" . | absURL}}">
{{- end }}

View File

@@ -0,0 +1,3 @@
<p class="definition">
<strong>containerd</strong> <span>| kənˈtānər D |</span><br> &ndash; an industry-standard container runtime<br>with an emphasis on <i>simplicity</i>,<br><i>robustness</i> and <i>portability</i>.
</p>

View File

@@ -0,0 +1,10 @@
<div class="footer">
<div class="footer-links">
<div class="link">
<a href="https://github.com/containerd/containerd"><img src="/img/containerd-light-d.png"/></a>
</div>
</div>
<div class="copyright">
Copyright (c) 2016-2018 the containerd authors
</div>
</div>

View File

@@ -0,0 +1,9 @@
{{- $gaId := .Site.Params.googleAnalyticsId }}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', {{ $gaId }}, 'auto');
ga('send', 'pageview');
</script>

View File

@@ -0,0 +1,4 @@
{{- $jsFiles := .Site.Params.js -}}
{{- range $jsFiles }}
<script src="{{ printf "/js/%s.js" . | absURL }}"></script>
{{- end }}

View File

@@ -0,0 +1,2 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@@ -0,0 +1,8 @@
<div class="navbar">
<div class="name"><a href="/">containerd</a></div>
<div class="actions">
<div class="link">
<a href="https://github.com/containerd/containerd"><img src="/img/containerd-light-d.png"/></a>
</div>
</div>
</div>

View File

@@ -0,0 +1,6 @@
{{- $features := .Site.Data.features }}
<ul>
{{- range $features }}
<li>{{ . | markdownify }}</li>
{{- end }}
</ul>

View File

@@ -0,0 +1,10 @@
{{- $news := .Site.Data.news }}
<ul>
{{- range $news }}
<li>
<a href="{{ .link }}">
{{ with .date }}{{ . }}: {{ end }}{{ .title }}
</a>
</li>
{{- end }}
</ul>