HubPress / hubpress.io

A web application to build your blog on GitHub
MIT License
2.81k stars 2.63k forks source link

Georgian date to Jalali? #425

Open farbodvand opened 8 years ago

farbodvand commented 8 years ago

So everything is going well on hubpress. As I'm translating the template, I was wonder, is there any way to use Jalali (Persian) date instead of Georgian? There's already two project on Jalali in Javascript but I don't know how to work it out in hubpress. here's the links one, two. Thanks.

iacchus commented 8 years ago

From the second link, add the index.js to your theme and use toJalaali function to convert.

Also, from that file you can remove these highlighted lines (1 to 15 )

Here is the documentation for HubPress/Ghost {{date}} helper, to edit your theme's date which uses Moment.js for formatting.

EDIT: Also found this which can be of your interest: https://github.com/jalaali/moment-jalaali

jaredmorgs commented 7 years ago

Thanks for helping out @pharbod with the theming question @iacchus

I'm definitely seeing that HubPress needs to give more basic guidance to folks that want to extend the base themes further.

This could be a good think to move into a Knowledgebase article.