-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3af8cc4
commit e248673
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |