diff options
| author | Shulhan <ms@kilabit.info> | 2020-10-08 19:21:42 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2020-10-08 19:21:42 +0700 |
| commit | ecaec9debf531309bc1f0d21633aabe490dfbb96 (patch) | |
| tree | 53b14fb247ec2d1406c22c6b7825080f12acd5aa /template_index_html.go | |
| parent | 396d45eee46ad4dcf33c224053e79373cf881f77 (diff) | |
| download | ciigo-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.go | 7 |
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> |
