Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/davidhampgonsalves/hugo-black-and-light-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hamp-Gonsalves <davidhampgonsalves@gmail.com>2018-08-01 13:25:34 +0300
committerDavid Hamp-Gonsalves <davidhampgonsalves@gmail.com>2018-08-01 13:25:34 +0300
commit3884985737ebc654314a372914e11a27d666c7b9 (patch)
tree5bda7c556788f94c94040730e0dd8cdf9920070c
parent8974fffac91cf01649287106435a7ef1316c16da (diff)
hide date if not set, use new post Pages
-rw-r--r--layouts/_default/single.html8
-rw-r--r--layouts/index.html2
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>