Coder Social home page Coder Social logo

Comments (9)

LukasJoswiak avatar LukasJoswiak commented on June 21, 2024

You need to set the date param in the front matter for the post.

from etch.

padaszewski avatar padaszewski commented on June 21, 2024

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",
]
+++

image

Before that I had a simple json with title, date and draft

from etch.

LukasJoswiak avatar LukasJoswiak commented on June 21, 2024

What version of Hugo are you running?

$ hugo version
hugo v0.104.3+extended darwin/amd64 BuildDate=unknown

from etch.

LukasJoswiak avatar LukasJoswiak commented on June 21, 2024

There shouldn't be any specific parameter to enable to display the dates, they should just show by default.

from etch.

LukasJoswiak avatar LukasJoswiak commented on June 21, 2024

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.

younsl avatar younsl commented on June 21, 2024

@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.

image

image

 

  • In my case, date and lastmod frontmatter are output normally without any specific config.toml settings.
  • You need to set date and lastmod value in the post frontmatter.

from etch.

padaszewski avatar padaszewski commented on June 21, 2024

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.

padaszewski avatar padaszewski commented on June 21, 2024

@younsl
I literally copy pasted Your config and the frontmatter and couldnt see the date anyway.

from etch.

LukasJoswiak avatar LukasJoswiak commented on June 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.