Skip to content

Commit 341fd6f

Browse files
committed
Fix Last Modification Date
1 parent 319b59c commit 341fd6f

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

archetypes/posts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
+++
22
title = "{{ replace .TranslationBaseName "-" " " | title }}"
33
date = "{{ .Date }}"
4-
lastmod = "{{ .Lastmod }}"
54
author = "Aleksander Reinhardt"
65
tags = ["", ""]
76
keywords = ["", ""]

hugo.toml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ title = "CodeLust"
44
theme = "terminal"
55
pagination.pagerSize = 5
66

7+
# allow Hugo to access Git information that can be used for content page metadata (https://gohugo.io/methods/page/gitinfo/)
8+
enableGitInfo = true
9+
10+
[frontmatter]
11+
# if possible, the last modification date for each content page will be the date of the last commit for that file
12+
# precedence order for determining .Lastmod (the page object property counterpart of the lastmod frontmatter variable)
13+
# 1. git commit time
14+
# 2. file modification time
15+
# 3. front matter 'lastmod'
16+
# 4. fallback to .Date
17+
lastmod = [":git", ":fileModTime", "lastmod", ":default"]
18+
719
[markup.highlight]
820
# whether to use inline CSS instead of an external CSS file for syntax highlighting
921
# required for Chroma (https://github.com/alecthomas/chroma) to work with Hugo
@@ -32,10 +44,6 @@ pagination.pagerSize = 5
3244
# the "cover" property can be removed from the content page markdown while this parameter is set to "true"
3345
autoCover = true
3446

35-
# allow Hugo to access Git information that can be used for content page metadata (https://gohugo.io/methods/page/gitinfo/)
36-
# the last modification date for each content page will be the date of the last commit for that file
37-
enableGitInfo = true
38-
3947
# whether or not to display when content pages were last updated
4048
showLastUpdated = true
4149

readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Code, Coffee, Metal
1212
+++
1313
title = "New Post"
1414
date = "2025-05-19T00:42:21+01:00"
15-
lastmod = "2025-07-20T12:26:15+01:00"
1615
author = "Aleksander Reinhardt"
1716
tags = ["", ""]
1817
keywords = ["", ""]

0 commit comments

Comments
 (0)