Commit 48fff48a authored by Ethan Madison's avatar Ethan Madison
Browse files

Add option to not show content date to templates



Set `noshowdate = true` in front matter of content to hide date.
Signed-off-by: default avatarEthan Madison <ethan@ethanmad.com>
parent f5595de0
......@@ -11,8 +11,10 @@
{{ range .Data.Pages }}
<li><a class="doc-entry" href="{{ .RelPermalink }}">
<span class="doc-entry-title">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</span>
{{ if not .Params.noshowdate }}
<span class="doc-entry-meta in-list">
(<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time>)
{{ end }}
</span>
</a></li>
{{ end }}
......@@ -25,4 +27,4 @@
</div> <!-- /.row -->
{{ partial "footer.html" . }}
\ No newline at end of file
{{ partial "footer.html" . }}
......@@ -7,7 +7,9 @@
<a id="title"></a>
<h1 class="doc-entry-title">{{ .Title }}</h1>
<div class="doc-entry-meta">
{{ if not .Params.noshowdate }}
<span><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
{{ end }}
</div>
<section>
{{ .Content }}
......@@ -20,4 +22,4 @@
</div> <!-- /.row -->
{{ partial "footer.html" . }}
\ No newline at end of file
{{ partial "footer.html" . }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment