Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdisadeghi committed Aug 29, 2017
1 parent 3af8cc4 commit e248673
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
jekyll-jalali
jekyll-jalali [![Gem Version](https://badge.fury.io/rb/jekyll-jalali.svg)](https://badge.fury.io/rb/jekyll-jalali)
============

This plugin adds a new filter to Jekyll called `jdate`. Using this filter the given dates will be converted to Jalali which is being used in Iran and Afghanistan. For more information see [Iranian Calendars Entry](http://en.wikipedia.org/wiki/Iranian_calendars) in Wikipedia.


# Requirements
This plugin uses `jalalidate` gem in background, therefore the following section should be added to `_config.yml`:
```
gems:
- jalalidate
```

see [https://github.com/aziz/jalalidate](https://github.com/aziz/jalalidate).

# Installation

Simply, put the ``jdate.rb`` into ``_plugins`` directory on your site's root.
Append `gem jekyll-jalali` to the `plugins` vector (formerly know as _gems_) of your website's __config.yml_ file. You can also put the _jekyll-jalali.rb_ file inside _plugins_ directory of your website. You can install it from Rubygems too:

```gem install jekyll-jalali```

# Usage
```{{ page.date | jdate: "%A %d %b %Y"}}```
Use it as a _Liquid_ filter inside any Jekyll template:
`{{ page.date | jdate: "%A %d %b %Y"}}`

*jdate* accepts valid formatting parameters according to *jalalidate* Ruby gem.

# Credits
This plugin uses [`jalalidate`]([https://github.com/aziz/jalalidate](https://github.com/aziz/jalalidate) gem for date conversion.

# License
MIT

0 comments on commit e248673

Please sign in to comment.