Issue on date: How can i remove the date from my pages? (Clarity theme)

Hello everyone !

I hope you all have a great day in this hot summer !

Im using an HUGO docker image with the Clarity theme for my project and everything works perfectly fine !

Except that i have pages with RSS feed, and my issue is that by default there is a wrong date that i can’t remove.

I don’t know if there is a way, in the config.toml or directly in the page to remove the date ?

Thanks :slight_smile:

Hi there and welcome on this forum,

You can

  • remove the line beginning with date from the header of your markdown file and see what happens
  • search post_date in the code of Clarity and remove the relevant lines

(I’m not sure if this forum is the best place for theme specific questions, maybe you should ask on Clarity’s Issue Tracker?)

Also see…
https://discourse.gohugo.io/search?q=jan+1%2C+0001

Hi @iaeiou and thanks for your answer.

Well i’m also gonna create a discussion on the clarity git repo.

Thanks :slight_smile:

@Arif Well i only search on google but you right, i must try on the forums, thanks !!

I don’t think that’s a valid date. See Hugo Date and Time Templating Reference

https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference

Well honestly i have no issue about puting a date in the hearders.

My issue is more about how to remove the date from the headers. By default it shows me this date “Jan 1, 0001”

Also here is the discussion i opened on this issue : totally remove date from pages · chipzoller/hugo-clarity · Discussion #441 · GitHub

You could use CSS to set the display of the date to none. Failing that, try to set the showdate parameter to false somewhere (see the partial post-meta). Or modify said partial.

Hello @chrillek and thank you for your answer.

By added showdate = false in the configuration file, i don’t see the date anymore !

But is it possible to do that for ONE specific page ? And allow to show date on the other page ? Like adding a condition or something ?

Thank you

Well, that’s not a question for Hugo and this forum, but for the theme and its author(s). I suggest reading the code (that’s what I did) and the documentation.

Alright @chrillek.

Thanks everyone, we can consider this as solved !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.