~gsthnz/gssg

747b6b41fbe93f0b408a58c8e6a1f11c7945c819 — Gustavo Heinz 3 years ago 3733102
Fix typo on postlength template
1 files changed, 2 insertions(+), 2 deletions(-)

M templates.go
M templates.go => templates.go +2 -2
@@ 22,8 22,8 @@ const default_page_template = `{{ .Content }}
{{ end -}}`

const default_index_template = `{{ .Content }}
{{ $postlenght := len .Children.posts -}}
{{ if gt $postlenght 0 -}}
{{ $postlength := len .Children.posts -}}
{{ if gt $postlength 0 -}}
## Posts on {{ .Config.Title }}
{{ range $post := .Children.posts }}
=> {{ $post.URLPath }} {{ $post.Date.Format "2006-01-02" }} - {{ $post.Title }}{{ end }}