sylhare / Type-on-Strap

🎨 Simplistic, responsive jekyll based open source theme
https://sylhare.github.io/Type-on-Strap/
MIT License
814 stars 902 forks source link

Added the means to localise the date format #283

Closed musicmichaelc closed 3 years ago

musicmichaelc commented 3 years ago

The date format can be defined in language.yml, e.g. date_format: "%B %d, %Y".

If one is using the polyglot plugin to build a multilingual site, one can place a language.yml file each into a separate directory for each language in _data, e.g. _data/en/language.yml, _data/de/language.yml—polyglot will automatically fetch the date_format (as well as all the other strings) according to the currently selected language.

If one doesn't do anything or doesn't add date_format: <date-format-string> to language.yml, the dates will—per default—show the same way they previously have been showing in this theme.

musicmichaelc commented 3 years ago

I've already merged/consolidated this into #284—together with a number of other multilingual/language support features.