fix: give precedence to date created over last modified if defined (#101)
This commit is contained in:
parent
dff5ae0d4d
commit
e15e39155d
@ -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)
|
- 🚧 [Troubleshooting and FAQ](notes/troubleshooting.md)
|
||||||
- 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues)
|
- 🐛 [Submit an Issue](https://github.com/jackyzha0/quartz/issues)
|
||||||
- 👀 [Discord Community](https://discord.gg/cRFFHYye7t)
|
- 👀 [Discord Community](https://discord.gg/cRFFHYye7t)
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<article>
|
<article>
|
||||||
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
|
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}.
|
Last updated {{ partial "date-fmt.html" .}}
|
||||||
{{ partial "github.html" . }}
|
{{ partial "github.html" . }}
|
||||||
</p>
|
</p>
|
||||||
<ul class="tags">
|
<ul class="tags">
|
||||||
|
7
layouts/partials/date-fmt.html
Normal file
7
layouts/partials/date-fmt.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{{if .Date}}
|
||||||
|
{{.Date.Format "Jan 2, 2006"}}
|
||||||
|
{{else if .Lastmod}}
|
||||||
|
{{.Lastmod.Format "Jan 2, 2006"}}
|
||||||
|
{{else}}
|
||||||
|
Unknown
|
||||||
|
{{end}}
|
@ -3,7 +3,7 @@
|
|||||||
<li class="section-li">
|
<li class="section-li">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<p class="meta">
|
<p class="meta">
|
||||||
{{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}
|
{{partial "date-fmt.html" .}}
|
||||||
</p>
|
</p>
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
<h3><a href="{{ .Permalink }}">{{- .Title -}}</a></h3>
|
<h3><a href="{{ .Permalink }}">{{- .Title -}}</a></h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user