-
Notifications
You must be signed in to change notification settings - Fork 854
Add configurable timestamping for posts #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
09ffe45
04f3b19
0eab9a5
0a09414
5940663
9c17481
da24107
6f51a05
a980985
26c7517
2ee779d
3ecbb11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,9 +6,27 @@ <h1 class="post-title"> | |
| <div class="post-meta"> | ||
| {{- if .Date -}} | ||
| <time class="post-date"> | ||
| {{- .Date.Format "2006-01-02" -}} | ||
| {{- $date := .Date | time -}} | ||
| {{- with .Params.dateFormat -}} | ||
| {{- $date | time.Format . -}} | ||
| {{- else -}} | ||
| {{- with .Site.Params.dateFormat -}} | ||
| {{- $date | time.Format . -}} | ||
| {{- else -}} | ||
| {{- $date | time.Format "2006-01-02" -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- if $.Site.Params.showLastUpdated -}} | ||
| [{{- or $.Site.Params.updatedDatePrefix "Updated" -}} :: {{- .Lastmod.Format "2006-01-02" -}}] | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @KatieTheDev Looks good and works well 💪 But I found that you removed the
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's a bug, after the fix we will merge it :) |
||
| {{- $lastmod := .Lastmod | time -}} | ||
KatieTheDev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {{- with .Params.dateFormat -}} | ||
| [{{- $lastmod | time.Format . -}}] | ||
| {{- else -}} | ||
| {{- with .Site.Params.dateFormat -}} | ||
| [{{- $lastmod | time.Format . -}}] | ||
| {{- else -}} | ||
| [{{- $lastmod | time.Format "2006-01-02" -}}] | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| </time> | ||
| {{- end -}} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.