Merge pull request #273 from henryiii/henryiii-lastmod

Adding last modified for pages if lastmod is set
This commit is contained in:
Michael Romero 2019-09-21 00:27:05 -07:00 committed by GitHub
commit 3836f4c24a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,6 @@
{{ if eq .Type "page" }}
{{ partial "page_meta.html" . }}
{{ end }}
<footer>
<div class="container">
<div class="row">

View file

@ -0,0 +1,8 @@
<div class="page-meta">
{{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }}
{{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }}
{{ if ne $datestr $lastmodstr }}
{{ $lastmodstr | i18n "lastModified" }}
{{ end }}
</div>