no need to be global here
authorYihui Xie <xie@yihui.name>
Mon, 19 Jun 2017 19:51:07 +0000 (14:51 -0500)
committerYihui Xie <xie@yihui.name>
Mon, 19 Jun 2017 19:51:07 +0000 (14:51 -0500)
layouts/_default/single.html

index 2a4cae8fe0508286f84728128ae851a36a575839..3dfda298e6a211464ab4b798c73a442c9245fc9c 100644 (file)
@@ -2,7 +2,7 @@
 <div class="article-meta">
 <h1><span class="title">{{ .Title }}</span></h1>
 {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
-{{ if .Params.date }}<h2 class="date">{{ $.Date.Format "2006/01/02" }}</h2>{{ end }}
+{{ if .Params.date }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
 </div>
 
 <main>