Skip to content
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

added lastmod date after slash in the post header if available. #450

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dc4332a
added lastmode date after slash in the post header if available.
McAviti Oct 1, 2023
46ba1ae
Update README.md for lastmod attribute
McAviti Oct 1, 2023
8790399
added parameters for last modified rendering
McAviti Oct 2, 2023
2765218
added the showLastmod and lastmodSeparator params
McAviti Oct 2, 2023
28f1108
Fix unexpected posts in recent posts list issue
LukeHong Dec 19, 2023
043ddf1
Improve Chinese translator text
imjokey Mar 2, 2024
3be813c
fix series_posts hard code display
imjokey Mar 2, 2024
f18a267
Fix icons/src property so that it does not 404
digitalbricklayer Jan 30, 2024
72f6392
add noindex parameter
stdevel Mar 29, 2024
9c1d6ac
fix spacing
stdevel Mar 29, 2024
cf6f528
update documentation
stdevel Mar 29, 2024
ef43b45
move parameter to proper documentation section
stdevel Apr 28, 2024
3ba622e
fix: onhover link icon color in dark mode
barefootstache Sep 14, 2024
d574dbc
Fix errors and warnings
deining Sep 13, 2024
94868be
bumps in CI test
chipzoller Sep 13, 2024
8713230
remove unused CI files
chipzoller Sep 13, 2024
c837324
Fix typos
deining Sep 13, 2024
7c8d843
Adding Giscus Support
rterakedis Sep 22, 2024
44bd57e
Update README.md
chipzoller Sep 22, 2024
da8d150
fix path to thumbnail images incorrect on second and higher page
Mar 27, 2024
afef3aa
Bump KaTeX to latest version 0.16.11
deining Sep 16, 2024
d57516e
feat: initiate `blogDir` setting
barefootstache Sep 9, 2024
4237532
feat: extend with keywords and categories
barefootstache Sep 9, 2024
2fe82aa
docs: update with `blogDir`
barefootstache Sep 9, 2024
536beef
Merge branch 'master' into make_lastmod_visible_in_post
chipzoller Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man
|:-------------------- | ------------------ | ---------------- |
| title | string | N/A |
| date | date | N/A |
| lastmod | date | N/A |
| description | string | N/A |
| keywords | array of strings | yes |
| introDescription | string | yes |
Expand All @@ -291,6 +292,8 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man
| comments | boolean | yes |
| enableMathNotation | boolean | yes |
| showDate | boolean | N/A |
| showLastmod | boolean | N/A |
| lastmodSeparator | string | N/A |
| showShare | boolean | N/A |
| showReadTime | boolean | N/A |
| sidebar | boolean | N/A |
Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/post-meta.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- $showShare := ne (.Param "showshare") false }}
{{- $showDate := ne (.Param "showdate") false }}
{{- $showLastmod := default false (.Param "showLastmod") }}
{{- $lastmodSeparator := default "/" (.Param "lastmodSeparator") }}
{{- $showReadTime := ne (.Param "showreadtime") false }}
{{- $showPostMeta := or ($showShare) ($showDate) ($showReadTime) (isset .Params "tags") }}
{{- $scratch := newScratch }}
Expand All @@ -11,6 +13,10 @@
<span>{{ partial "sprite" (dict "icon" "calendar") }}</span>
<span class="post_date">
{{ .Date.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) -}}
{{ if (and $showLastmod (ne .Date .Lastmod)) }}
{{ $lastmodSeparator }} <time datetime="{{ .Lastmod.Format "Mon Jan 10 17:13:38 2020 -0700" }}">
{{ .Lastmod.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) }}</time>
{{ end }}
</span>
{{- $scratch.Set "writeSeparator" true }}
{{- end }}
Expand Down