-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.tmpl
53 lines (49 loc) · 1.2 KB
/
site.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{{ define "header" }}<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="{{ html .Site.Other.Author }}">
<link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="{{ .Rel "blog.atom" }}">
<title>{{ .Site.Other.Title }}{{ if .Title }}: {{ .Title }}{{ end }}</title>
<link rel="stylesheet" type="text/css" href="/static/css/bulma.min.css">
</head>
<body>
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
<h1 class="title">
Golang Books
</h1>
</div>
</div>
</section>
{{ end }}
{{ define "footer" }}
</body>
</html>
{{ end }}
{{ define "page" }}{{ template "header" . }}
<div class="container">
{{ .Content }}
</div>
{{ template "footer" . }}{{ end }}
{{ define "post" }}
<article>
<header>
<h1>{{ .Title }}</h1>
<div class="info">
{{ range $i, $t := .Tags }}{{if $i}},{{end}}
<a href="/tags/{{ $t }}/">{{ $t }}</a>{{ end }}
</div>
</header>
<section>
{{ .Content }}
</section>
</article>
{{ end }}
{{define "tag"}}
# Pages tagged with {{ .Title }}
{{ range .Site.Pages.WithTag .Title }}
- [{{ .Title }}](../../{{ .Url }})
{{ end }}
{{ end }}