mehdix
mehdix

Reputation: 5154

How can I customize date generation in Jekyll?

I would like to use Hindu-Arabic numbers in Jekyll i.e. ۱۲۳۴۵۶۷۸۹۰ instead of 1234567890. How can I customize Jekyll to achieve this or which parts of Jekyll should be extended to support this feature?

Upvotes: 1

Views: 132

Answers (2)

ento
ento

Reputation: 5889

Jekyll outputs date strings with the date Liquid filter by default. To customize this behavior, you need to use a plugin to provide an i18n-aware date formatter (filter) to use in your templates.

For example, take a look at i18n_filter.rb which is linked from the official Jekyll documentation.

Upvotes: 1

David Jacquel
David Jacquel

Reputation: 52799

The use of any utf-8 characters is up to the writer. It's content and it's not par of the software. So you have nothing to customize for Jekyll to use Hindu-Arabic numbers natively.

Just check that your charset is present in your html and that it is set as utf-8.

<!DOCTYPE html>
<html>
 <head>
   <meta charset="utf-8">

Nothing more.

Upvotes: 0

Related Questions