diff options
Diffstat (limited to 'layouts/partials/single/dates.html')
-rw-r--r-- | layouts/partials/single/dates.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/single/dates.html b/layouts/partials/single/dates.html new file mode 100644 index 0000000..080e37b --- /dev/null +++ b/layouts/partials/single/dates.html @@ -0,0 +1,24 @@ +{{ $pubdate := .PublishDate.Format "2006-01-02" }} +{{ $lastmod := .Lastmod.Format "2006-01-02" }} + +{{ $file := .File.LogicalName }} +{{ $path := .File.Path }} +{{ $lastmodhash := .GitInfo.Hash }} + +<aside class="publish-date"> + {{ if eq $pubdate $lastmod }} + + Published: <time datetime="{{ $pubdate }}"> + <a href="{{$.Site.Params.repoUrl}}/commit/{{$lastmodhash}}">{{ $lastmod }}</a> + </time> + {{ else }} + + Originally published: + + <time datetime="{{ $pubdate }}">{{ $pubdate }}</time>; + updated: <time datetime="{{ $lastmod }}"> + <a href="{{$.Site.Params.repoUrl}}/commit/{{$lastmodhash}}">{{ $lastmod }}</a> + </time> +</aside> + {{ end }} + |