Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulrobertlloyd/jekyll-roman
A liquid filter for Jekyll that converts numbers into Roman numerals
https://github.com/paulrobertlloyd/jekyll-roman
jekyll-plugin
Last synced: about 1 month ago
JSON representation
A liquid filter for Jekyll that converts numbers into Roman numerals
- Host: GitHub
- URL: https://github.com/paulrobertlloyd/jekyll-roman
- Owner: paulrobertlloyd
- License: mit
- Created: 2015-11-11T00:34:07.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T02:08:50.000Z (8 months ago)
- Last Synced: 2024-10-23T23:26:09.792Z (about 2 months ago)
- Topics: jekyll-plugin
- Language: Ruby
- Homepage: https://rubygems.org/gems/jekyll-roman
- Size: 16.6 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jekyll-plugins - **Roman** - roman](https://rubygems.org/gems/jekyll-roman)) by Paul Robert Lloyd -- A liquid filter for Jekyll that converts numbers into Roman numerals (Text Filters)
README
# jekyll-roman
A liquid filter for Jekyll that converts numbers into Roman numerals.
[![Gem version](https://img.shields.io/gem/v/jekyll-roman.svg)](https://rubygems.org/gems/jekyll-roman)
[![Build status](https://github.com/paulrobertlloyd/jekyll-roman/workflows/test/badge.svg)](https://github.com/paulrobertlloyd/jekyll-roman/actions)## Installation
1. Add `gem 'jekyll-roman'` to your site’s Gemfile and run `bundle`
2. Add the following to your site’s `_config.yml`:```yaml
gems:
- jekyll-roman
```## Usage
This filter takes any given whole number and converts it. Any other types of string are ignored. For example, if you wish to display the year in your site’s copyright statement as roman numerals, you would write the following:
```html
© {{ site.time | date:"%Y" | roman }}
````## Testing
1. `bundle install`
2. `bundle exec rake spec`## Contributing
1. Fork the project
2. Create a descriptively named feature branch
3. Add your feature
4. Submit a pull request## Acknowledgements
Code based on that found in [this discussion on Stack Overflow](http://stackoverflow.com/questions/26092510/roman-numerals-in-ruby). If you know of a better way of achieving the same result, please let me know!