aboutsummaryrefslogtreecommitdiff
path: root/template_index_html.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2020-10-08 19:21:42 +0700
committerShulhan <ms@kilabit.info>2020-10-08 19:21:42 +0700
commitecaec9debf531309bc1f0d21633aabe490dfbb96 (patch)
tree53b14fb247ec2d1406c22c6b7825080f12acd5aa /template_index_html.go
parent396d45eee46ad4dcf33c224053e79373cf881f77 (diff)
downloadciigo-ecaec9debf531309bc1f0d21633aabe490dfbb96.tar.xz
all: check for zero last updated when unpacking adoc metadata
If the date is zero ("0001-01-01 ...") reset it to empty string and do not render it on HTML output.
Diffstat (limited to 'template_index_html.go')
-rw-r--r--template_index_html.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/template_index_html.go b/template_index_html.go
index cc9c54b..52a775e 100644
--- a/template_index_html.go
+++ b/template_index_html.go
@@ -39,9 +39,10 @@ const templateIndexHTML = `<!DOCTYPE html>
<div class="container">
<h1>{{.Title}}</h1>
<div class="meta">
- {{.Author}}
- <br />
- {{.Date}}
+ {{if .Author}}{{.Author}}{{end}}
+ {{- if .Date}}<br />
+ {{.Date}}
+ {{- end}}
</div>
{{.Body}}
</div>