etch
etch copied to clipboard
Question: how to set the post creation dates visible?
Hi,
In Your example You have visible dates on the posts

In my case these dates does not appear:

I have the same config as in the example site. Is there a specific param to set in order to get this work?
You need to set the date param in the front matter for the post.
Sure, I've done that. I even copied the front matter from the example and got the same result:
+++
author = "Hugo Authors"
title = "Test"
date = 2019-03-05
description = "Guide to emoji usage in Hugo"
tags = [
"emoji",
]
+++

Before that I had a simple json with title, date and draft
What version of Hugo are you running?
$ hugo version
hugo v0.104.3+extended darwin/amd64 BuildDate=unknown
There shouldn't be any specific parameter to enable to display the dates, they should just show by default.
If you click through to the page for the post, does it show the date under the title, like it does at https://lukasjoswiak.github.io/etch/markdown-syntax-guide/?
@padaszewski
Here's my codes I am using.
Environment
Content
Set data and lastmod on each post.
---
title: "도커 파일시스템 정리"
date: 2022-03-16T13:07:20+09:00
lastmod: 2022-08-31T10:03:10+09:00
slug: ""
description: "쿠버네티스 워커 노드가 파일시스템 사용률이 높을 때, docker system prune 명령어를 실행해서 Docker 오브젝트를 정리하여 파일시스템 공간을 확보할 수 있다."
keywords: []
tags: ["os", "linux", "docker"]
---
... then contents from now on ...
Config
baseURL = "https://younsl.github.io"
title = "younsl"
theme = "etch"
languageCode = "en-US"
enableInlineShortcodes = true
pygmentsCodeFences = true
pygmentsUseClasses = true
disableKinds = ["taxonomy", "term"]
[params]
description = "younsl"
copyright = ""
dark = "on"
highlight = true
[article]
showComments = true
showAdvertisement = true
[menu]
[[menu.main]]
identifier = "wiki"
name = "wiki"
title = "wiki"
url = "/wiki/"
weight = 10
[permalinks]
posts = "/:title/"
[markup.goldmark.renderer]
# Allow HTML in Markdown
unsafe = true
[markup.tableOfContents]
ordered = true
Output
Here's what the webpage looks like in the Chrome browser.
- In my case,
dateandlastmodfrontmatter are output normally without any specificconfig.tomlsettings. - You need to set
dateandlastmodvalue in the post frontmatter.
Hi @LukasJoswiak, Hi @younsl
Thanks for the info. Unfortunately the approach with lastmod is also not working correctly.
@LukasJoswiak
hugo version output:
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended windows/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio
On my blog You also can't see the date under the post :/
@younsl I literally copy pasted Your config and the frontmatter and couldnt see the date anyway.
Can you try building the example site in this repo and see if the issue reproduces?
I thought it could be an issue with your Hugo version, but I built Hugo v110.0
hugo % ./hugo version
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168 darwin/amd64 BuildDate=2023-01-17T12:16:09Z
and then built the example site in this repo with it and I see all the dates correctly. I think it's likely there is some issue with your local site configuration.