enten / hyde-y

Enhanced port of the Jekyll "Hyde" theme to Hugo
MIT License
88 stars 62 forks source link

international date names #15

Closed milosvvv closed 7 years ago

milosvvv commented 8 years ago

I am not a developer, much less a web developer and I've spent the better part of today trying to figure out how to get dates in my own language using the Hyde-y theme in Hugo.

I looked at the "Customize Dates" section of http://gohugo.io/tutorials/create-a-multilingual-site/ but it doesn't seem Hyde-y does anything like this when it comes to dates.

I've tried silly things like adding {{ index $.Site.Data.ownmonths (printf "%d" .Date.Month) }} instead of the month name to data/Formats.yaml with the only result being the code itself posted on the generated site.

I've even tried editing the names of months in /themes/hyde-y/node_modules/grunt/node_modules/dateformat/lib/dateformat.js with no apparent effect.

I'm at a loss of what to try next, I don't understand how the theme generates the dates or where they come from, I was so happy to find dateformat.js, thinking this was going to be the end of my adventure it but in the end I got nothing.

Any ideas?

enten commented 8 years ago

See PR #3

You only need to create and edit data/Formats.yaml as needed.

milosvvv commented 8 years ago

hmm don't know why I didn't think of that before, as I did figure out and edit data/Strings.yaml accordingly.

This works fine I guess, if a bit ugly for a blog. It would be nicer to use actual written names (both short and long) for months instead of the numeric date. A Formats file to translate each month would be better, but I am no coder and it would take me forever to figure out how to add that functionality, hopefully a future version will be more customizable in this way.

Thanks!