This issue is related to a hugo site page hosted with GitHub pages.
The following is added in the metadata section of a blog.md file:
title: Blog title
date: 2023-09-10T12:12:25.364Z
The data on the blog page is getting displayed as shown below:
<span title='2023-09-10 12:12:25.364 +0000 UTC'>September 10, 2023</span>
I only want to keep September 10, 2023 and don’t want to include the rest on the blog page.
The html file from where it is fetching the data has the following code:
{{- if not .Date.IsZero -}}
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }}
{{- end }}
As part of troubleshooting, I have done several changes in the above code and the print statement, but couldn’t get the desired result. Any inputs or pointers on this will be helpful.
Thank you for your time!