gbif / hosted-portals

Support material for establishing the GBIF Hosted Portals
Apache License 2.0
10 stars 6 forks source link

Translation | dates on posts #114

Closed camiplata closed 3 years ago

camiplata commented 3 years ago

@MortenHofft How can we translate the dates of the posts?

Captura de Pantalla 2021-03-17 a la(s) 6 11 00 p  m

Thank you in advance

MortenHofft commented 3 years ago

No but it is a very reasonable request.

Pragmatic solution When briefly looking I couldn't find any Jekyll plugins that handled just the dates. And after giving it some thought I like the simplicity and freedom of just making it a text field.

It could also be argued that posts doesn't have to be used as news with dates. So, I've opted for using the preTitle property on cards as we do on posts anyway. That gives editors the freedom to write want they want. Could be a date in any language. It could be anything really.

Automate it If someone finds it frustrating having to write dates on posts, then I'm very open to a pull request. The approach should probably be something along: a Jekyll plugin that can localize dates. And an option in _config to use dates over preTitle for posts.

MortenHofft commented 3 years ago

Closed by https://github.com/gbif/jekyll-hp-base-theme/commit/393149d650c9676c9e8db323a4fa31cc6e96a105