diff options
author | Adam Mathes <adam@trenchant.org> | 2017-02-09 20:14:46 -0800 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2017-02-09 20:14:46 -0800 |
commit | 50f608846f1021db4f2335744cc023231fb74652 (patch) | |
tree | d75e57955029ebcda9da72a29e3c7555e02b4eb5 /site | |
parent | ded6e3b25bca083cabe21bda6f4d01f6766587bc (diff) | |
download | snkt-50f608846f1021db4f2335744cc023231fb74652.tar.gz snkt-50f608846f1021db4f2335744cc023231fb74652.tar.bz2 snkt-50f608846f1021db4f2335744cc023231fb74652.zip |
fix some templates, add verbose-logger
Diffstat (limited to 'site')
-rw-r--r-- | site/init.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/site/init.go b/site/init.go index dc17cfa..02a7586 100644 --- a/site/init.go +++ b/site/init.go @@ -27,7 +27,6 @@ var skeletons = []skeleton { <title>{{template "title" .}}</title> </head> <body> - <h1>{{template "title"}}</h1> {{template "content" .}} <hr /> <p><a href="{{.Site.URL}}/index.html">Home</a></p> @@ -55,9 +54,10 @@ var skeletons = []skeleton { Dir: "tmpl", Filename: "post", Content: []byte( -`{{define "title"}}{{ .Post.Title }}{{end}} +`{{define "title"}}{{.Post.Title}} - {{.Site.Title}}{{end}} {{define "content"}} -<h2>{{ .Post.Title }}</h2> +<h1>{{.Site.Title}}</h1> +<h2>{{.Post.Title}}</h2> {{.Post.Content}} {{if .Post.Next.Title}} <p><a href="{{.Post.Next.Permalink}}">{{.Post.Next.Title}}</a></p> @@ -74,6 +74,7 @@ var skeletons = []skeleton { `{{define "title"}}{{.Site.Title}} Archives{{end}} {{define "content"}} <h1>{{ .Site.Title }}</h1> +<h2>Archives</h2> {{range .Posts}} {{if .}}<h2><a href="{{.Permalink}}">{{.Title}}</a></h2>{{end}} {{end}} @@ -124,6 +125,8 @@ func Init(directory string) { } var cfg = config.Settings{ + SiteTitle: "snkt", + SiteURL: "", TxtDir: path.Join(init_dir, "txt"), HtmlDir: path.Join(init_dir, "html"), TmplDir: path.Join(init_dir, "tmpl"), |