Compare commits

...

2 Commits

Author SHA1 Message Date
Greg Gauthier 535a069386 finally, updated dates are showing 2021-04-11 23:12:22 +01:00
Greg Gauthier f71f286333 testing lastmod again 2021-04-11 22:38:24 +01:00
4 changed files with 23 additions and 7 deletions

View File

@ -32,7 +32,7 @@ enableGitInfo = true
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = ["lastmod", ":git", "date", "publishDate"]
lastmod = [":fileModTime", "lastmod", ":git", "publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]

View File

@ -0,0 +1,10 @@
---
title: "One Last Try"
date: 2021-04-11T22:21:59+01:00
tags: ["shortcodes", "lastmod"]
topics: ["blogging"]
draft: true
---
How is this working, but not on any other pages?

View File

@ -3,7 +3,7 @@ title: "Testing New Shortcodes"
date: 2021-04-10T11:27:58+01:00
draft: false
---
Today, I'm just testing out a few new Hugo shortcodes I added to the site. I've culled these from around the internet, and hacked together some of my own. You might find them useful, if you're doing static blogging yourself. You can find all the code on the repo for this site, **{{< newtab title="found here." url="https://gitea.gmgauthier.com/gmgauthier/personal-blog" >}}** As I do more and more blogging from the static site generator, this sort of thing will be more and more useful to me, at least.
Here is a link to my legacy philosophy blog, that will open in a new tab. Out of the box, neither markdown, nor Hugo will do this: **{{< newtab title="Exiting The Cave" url="https://exitingthecave.com/" >}}**

View File

@ -1,9 +1,16 @@
<div class="post-meta">
<div>
<i class="fa fa-calendar fa-fw"></i>
<time>{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04" }}{{ end }}</time>
</div>
<span>
<div style="float:left; font-size:medium; font-weight: bold;">
<i class="fa fa-calendar fa-fw"></i>
<time> {{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04 BST" }}{{ end }}</time>
</div>
<div style="float:right; font-size:x-small; font-weight: bold;">
<i class="fa fa-calendar fa-fw"></i>
<time>Updated: {{ .Lastmod.Format "02 Jan 2006, 15:04" }} </time>
</div>
<br/>
</span>
{{ $baseUrl := .Site.BaseURL }}
@ -30,5 +37,4 @@
</div>
{{ end }}
{{ end }}
</div>