Search code examples
internationalizationjekylljekyll-extensions

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?


Solution

  • 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.