Hugo Blowfish date and time

Hello so im facing a problem. blowfish is always making a structure that groups stuff by year. they have a command called “groupByYear” but i want to find a way so that it groups by year only if i specify a year. if not i dont want anything to show up.


Here is an example in the first photo since i did not specify a year it is showing 0001 but id like to remove that without removing the year in the second photo

Talk to the theme author nunocoracao/blowfish · Discussions · GitHub.

ok thanks ill do that!

You (or the theme author) can use something like to exclude zero dates:

{{ range (where site.RegularPages "Date.IsZero" false).GroupByDate "2006" }}
  <h2>{{ .Key }}</h2>
  {{ range .Pages }}
    <h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
  {{ end }}
{{ end }}

im not the theme author and i cant ask them personally. do you know where abouts i add this? in what .html or whatever file do i add that to?

Based on my perception of your experience level, I think it would be best if you were to convince the theme author to make the change. They use GroupByDate in lots of places:

image

Alternatively, provide front matter dates.

i have no relation to the author. so that would be hard. im just someone thats trying to do stuff with the public theme that they have. how would you go about to fix it?