I’m trying to customize date using yaml data
partials/comments_list.html
...
{{ $date := .date }}
{{ (time $date).Day }}
{{ $bulan := (time $date).Month }}
{{ index $.Site.Data.bulan (printf "%d" $bulan) | humanize }},
{{ (time $date).Year }}
...
{{ partial "comments_replies" (dict "entryId_parent" $postSlug "SiteDataComments_parent" $.Site.Data.comments "parentId" ._id "parentName" .name "context" .) }}
as you can see in the code above {{ index $.Site.Data.bulan (printf "%d" $bulan) | humanize }}
working as i expected, but when i applied the same code inside partial comment_replies it throw me an error calling index: index of untyped nil
I wonder how can i apply the index $.Site.Data.bulan
inside the partial comment_replies
?
the source code is here