aboutsummaryrefslogtreecommitdiff
path: root/template/article.tmpl
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2013-03-08 09:22:40 +1100
committerAndrew Gerrand <adg@golang.org>2013-03-08 09:22:40 +1100
commit0ee9872fcd5cf9023cb43a68faf67203cbe81295 (patch)
treefaa873e0163e1d1b35e86b812de77afd3da7f6bb /template/article.tmpl
parentc26ca9cbba2bc725e1d7d26754ac5167a44ddb76 (diff)
go.blog: blog server
R=golang-dev, dsymonds, r CC=golang-dev https://golang.org/cl/7382064
Diffstat (limited to 'template/article.tmpl')
-rw-r--r--template/article.tmpl15
1 files changed, 15 insertions, 0 deletions
diff --git a/template/article.tmpl b/template/article.tmpl
new file mode 100644
index 0000000..fae2333
--- /dev/null
+++ b/template/article.tmpl
@@ -0,0 +1,15 @@
+{{/* This file is combined with the root.tmpl to display a single article. */}}
+
+{{define "title"}}{{.Doc.Title}} - The Go Blog{{end}}
+{{define "content"}}
+ {{template "doc" .Doc}}
+ {{with .Doc.Related}}
+ <h1>Related articles</h1>
+ <ul>
+ {{range .}}
+ <li><a href="{{.Path}}">{{.Title}}</a></li>
+ {{end}}
+ </ul>
+ {{end}}
+{{end}}
+