Comments (9)
You need to set the date
param in the front matter for the post.
from etch.
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
from etch.
What version of Hugo are you running?
$ hugo version
hugo v0.104.3+extended darwin/amd64 BuildDate=unknown
from etch.
There shouldn't be any specific parameter to enable to display the dates, they should just show by default.
from etch.
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/?
from etch.
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,
date
andlastmod
frontmatter are output normally without any specificconfig.toml
settings. - You need to set
date
andlastmod
value in the post frontmatter.
from etch.
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 :/
from etch.
@younsl
I literally copy pasted Your config and the frontmatter and couldnt see the date anyway.
from etch.
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.
from etch.
Related Issues (20)
- Output not having correct css HOT 2
- Feature request: categories and tags HOT 1
- Feature request: Last modified date HOT 4
- Code blocks too wide HOT 3
- Front page blog description not visible HOT 2
- rendering problems with rss HOT 2
- A topic customization problem. HOT 2
- Taxonomies not working HOT 3
- Adding new features HOT 4
- Anyway to set a different url when click on the website's name? HOT 11
- failed to load translations? HOT 1
- site not building
- Footnotes text size renders incorrectly with Hugo 0.98.0 or later HOT 6
- Mathjax/Katex doesn't seem to work.
- Pagination problem
- Include post heading's on taxonomy pages? HOT 1
- failed to load translations (deploy vercel) HOT 2
- Question: how to set the post creation dates visible? (accidentaly duplicated)
- Does this support pagination in the front page? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etch.