diff options
author | David Hamp-Gonsalves <davidhampgonsalves@gmail.com> | 2018-08-01 13:25:34 +0300 |
---|---|---|
committer | David Hamp-Gonsalves <davidhampgonsalves@gmail.com> | 2018-08-01 13:25:34 +0300 |
commit | 3884985737ebc654314a372914e11a27d666c7b9 (patch) | |
tree | 5bda7c556788f94c94040730e0dd8cdf9920070c | |
parent | 8974fffac91cf01649287106435a7ef1316c16da (diff) |
hide date if not set, use new post Pages
-rw-r--r-- | layouts/_default/single.html | 8 | ||||
-rw-r--r-- | layouts/index.html | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f7358fd..b47b8f4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,9 +3,11 @@ <section id=content> <h1>{{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ end }}</h1> - <div id=sub-header> - {{ .Date.Format (.Site.Params.dateform | default "January 2006") }} · {{ .ReadingTime }} minute read - </div> + {{ if .Params.date }} + <div id=sub-header> + {{ .Date.Format (.Site.Params.dateform | default "January 2006") }} · {{ .ReadingTime }} minute read + </div> + {{ end }} <div class="entry-content"> {{ .Content }} diff --git a/layouts/index.html b/layouts/index.html index 63a0896..68e66b7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,7 @@ <section id=content> <ul class=posts_listing> - {{ range .Data.Pages.ByPublishDate.Reverse }} + {{ range .Pages }} <li> <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <div id=date> |