From e15e39155de54dc1624bab80eefbccd6a783cd0c Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Fri, 15 Jul 2022 14:26:31 -0700 Subject: [PATCH] fix: give precedence to date created over last modified if defined (#101) --- content/_index.md | 1 + layouts/_default/single.html | 2 +- layouts/partials/date-fmt.html | 7 +++++++ layouts/partials/page-list.html | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/date-fmt.html diff --git a/content/_index.md b/content/_index.md index 7d6d3f98a..0a7dfc1a3 100644 --- a/content/_index.md +++ b/content/_index.md @@ -24,3 +24,4 @@ If you prefer browsing the contents of this site through a list instead of a gra - 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md) - 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues) - 👀 [Discord Community](https://discord.gg/cRFFHYye7t) + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7c2ab10f5..b4dd6dee1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,7 @@
{{if .Title}}

{{ .Title }}

{{end}}

- Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}. + Last updated {{ partial "date-fmt.html" .}} {{ partial "github.html" . }}