diff options
author | Daniel Saunders <daniel.saunders@gmail.com> | 2020-02-19 04:00:25 +0300 |
---|---|---|
committer | Daniel Saunders <daniel.saunders@gmail.com> | 2020-02-19 04:00:25 +0300 |
commit | 72cb357c89793acc6fc19fb2421173e700912958 (patch) | |
tree | 58400161289020bc0075d30efdd49645e8dde762 | |
parent | c7b4ee5a0d96846cd326786014a5af96e1ca69bc (diff) |
Display date on single pages20200219
-rw-r--r-- | exampleSite/content/posts/hello-world.md | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 5 | ||||
-rw-r--r-- | layouts/sermons/single.html | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/exampleSite/content/posts/hello-world.md b/exampleSite/content/posts/hello-world.md index e6c5977..5e00b5c 100644 --- a/exampleSite/content/posts/hello-world.md +++ b/exampleSite/content/posts/hello-world.md @@ -1,9 +1,8 @@ --- title: "Hello World!" -subtitle: "" +subtitle: "Just wanted to say..." date: 2018-05-03T21:08:01+10:00 images: ["img/freely-26905.jpg"] tags: ["testing"] -draft: true --- Just saying *hi*! diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 926495d..2929873 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,9 +4,7 @@ <section id="main" class="container">
<header>
<h2>{{ if .Draft }}DRAFT: {{end}}{{ .Params.title }}</h2>
- {{ with .Params.subtitle }}
- <p>{{ . }}</p>
- {{ end }}
+ {{ with .Params.subtitle }}<p>{{ . }}</p>{{ end }}
</header>
<div class="box">
{{ with .Params.images }}
@@ -23,6 +21,7 @@ {{ end }} {{/* range */}}
</p>
{{ end }} {{/* if tags */}}
+ {{ with .Params.Date }}<p>Date: {{ . | dateFormat "January 2, 2006"}}</p>{{ end }}
</div>
</div>
</section>
diff --git a/layouts/sermons/single.html b/layouts/sermons/single.html index 74f8ac5..63c117e 100644 --- a/layouts/sermons/single.html +++ b/layouts/sermons/single.html @@ -3,9 +3,7 @@ <section id="main" class="container"> <header> <h2>{{ if .Draft }}DRAFT: {{end}}{{ .Params.title }}</h2> - {{ with .Params.passage }} - <p>{{ . }}</p> - {{ end }} + {{ with .Params.passage }}<p>{{ . }}</p>{{ end }} </header> <div class="box"> <div class="row"> @@ -60,6 +58,7 @@ {{ end }} {{/* range */}} </p> {{ end }} {{/* end if tags */}} + {{ with .Params.date }}<p>Date: {{ . | dateFormat "January 2, 2006"}}</p>{{ end }} </div> </div> </div> |