diff options
| author | Adam Whitlock <adam@adamwhitlock.com> | 2022-01-16 10:44:21 -0600 |
|---|---|---|
| committer | Adam Whitlock <adam@adamwhitlock.com> | 2022-01-16 10:44:21 -0600 |
| commit | 53ed1d52f6a6f06b17c364af5838434d88ec947d (patch) | |
| tree | f54c14ce376745dca376c376166c84cb50bc0386 | |
| parent | d1d493c5ece3e79c463a66db8663eccd0d80b464 (diff) | |
Corrected PublishDate & LastMod for posts
| -rw-r--r-- | layouts/_default/single.html | 5 | ||||
| -rw-r--r-- | layouts/index.html | 2 | ||||
| -rw-r--r-- | layouts/pages/archive.html | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0947162..b626da3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,11 +14,8 @@ <div class="column"> <div class="content"> <h1 class="title is-3">{{.Page.Title | title }}</h1> - <h2 class="subtitle is-5"><time>{{ .Date.Format "Jan 2, 2006" }}</time></h2> - {{ $dateFormat := .Site.Params.dateFormat | default "January 2, 2006"}}{{ if ne .Lastmod .PublishDate }}, last updated on {{ .Lastmod.Format $dateFormat }}{{ end }} + <h2 class="subtitle is-5"><time>{{ .Date.Format "January 2, 2006" }}{{ if ne .Lastmod .PublishDate }} / Updated {{ .Lastmod.Format "January 2, 2006" }}{{ end }}</time></h2> <p class="subtitle is-4">{{.Page.Description}}</p> - <p class="date">Published on {{ .PublishDate.Format $dateFormat }} - </p> {{ .Content }} </div> </div> diff --git a/layouts/index.html b/layouts/index.html index e2888db..8c180bd 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -33,7 +33,7 @@ <div class="column"> <div class="content"> <h1 class="title is-3"><a class="" href="{{ .RelPermalink }}"> {{ .Title | title }}</a></h1> - <h2 class="subtitle is-5"><time>{{ .Date.Format "Jan 2, 2006" }}</time></h2> + <h2 class="subtitle is-5"><time>{{ .Date.Format "January 2, 2006" }}{{ if ne .Lastmod .PublishDate }} / Updated {{ .Lastmod.Format "January 2, 2006" }}{{ end }}</time></h2> <p class="subtitle is-4">{{.Page.Description}}</p> <p>{{ .Summary }}</p> {{ if .Truncated }} diff --git a/layouts/pages/archive.html b/layouts/pages/archive.html index c648a80..ba04b79 100644 --- a/layouts/pages/archive.html +++ b/layouts/pages/archive.html @@ -12,7 +12,7 @@ {{ range .Pages.ByPublishDate.Reverse }} <li> <span class="fa-li"><i class="fas fa fa-file"></i></span><a href="{{ .Permalink }}">{{ .Title | title }}{{ if .Description }}: {{ .Description}}{{ end }}</a> - <p>Posted on <time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p> + <p>Published on <time>{{ .Date.Format "January 2, 2006" }}</time></p> </li> {{ end }} </ul> |
