docs: Refactor /docs to use the block keyword
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 20 Jun 2016 13:20:44 +0000 (15:20 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 20 Jun 2016 13:50:41 +0000 (15:50 +0200)
Fixes #2226
Closes #2229

docs/layouts/_default/baseof.html [new file with mode: 0644]
docs/layouts/_default/single.html

diff --git a/docs/layouts/_default/baseof.html b/docs/layouts/_default/baseof.html
new file mode 100644 (file)
index 0000000..076f46d
--- /dev/null
@@ -0,0 +1,12 @@
+{{ partial "header.html" . }}
+{{ if .Params.toc }}
+<div class="col-lg-8 col-md-12">
+{{block "main" .}}{{end}}
+</div>
+<div id="toc" class="col-lg-offset-6 toc {{ if gt (len .TableOfContents) 2500 }}compact{{ end }}">
+    {{ .TableOfContents }}
+</div>
+{{ else }}
+{{block "main" .}}{{end}}
+{{ end }}
+{{ partial "footer.html" . }}
index 702014061e28b2fdd96643d71d4730fe76d9e49c..b8bcfa70c39285aefb6ab13b4ba8e6155b1ffc0a 100644 (file)
@@ -1,12 +1 @@
-{{ partial "header.html" . }}
-{{ if .Params.toc }}
-<div class="col-lg-8 col-md-12">
-{{ .Content }}
-</div>
-<div id="toc" class="col-lg-offset-6 toc {{ if gt (len .TableOfContents) 2500 }}compact{{ end }}">
-    {{ .TableOfContents }}
-</div>
-{{ else }}
-{{ .Content }}
-{{ end }}
-{{ partial "footer.html" . }}
+{{ define "main" }}{{ .Content }}{{ end }}