0.0
There's a lot of open issues
No release in over a year
"jekyll-mahjong" is a Jekyll plugin that offers a "mahjong" tag that will translate the text notation like "123p444s" into vector graphics of mahjong tiles. Note that you need to import the SCSS stylesheet that comes with this gem. For documentation including installation instructions and demo, please see here: https://peterish.com/riichi-docs/jekyll-mahjong-plugin/.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

jekyll-mahjong

Jekyll plugin for converting Riichi mahjong text notation into SVG images.

See here for usage notes and demo.

Installation

First, add gem "jekyll-mahjong" to the :jekyll_plugins group in your Gemfile and run bundle install.

group :jekyll_plugins do
  gem "jekyll-mahjong"
end

Then, you need to ensure that Jekyll sees the stylesheet /_sass/mahjong.scss. For many Jekyll themes, this just means adding the following line to your site source's /assets/css/main.scss:

@import "mahjong";

After installing the plugin and building your site once, you'll find /assets/tiles/*.svg and /_sass/mahjong.scss in your site's source directory. If you want, you can add them to your .gitignore. If you already have those files in your source directory, jekyll-mahjong won't overwrite them unless you specifically enable overwriting (see next section).

Customization

All styling is done through /_sass/mahjong.scss; you can modify it to adjust parameters like the height of tiles, space between tile groups, etc.

Similarly, you can replace the /assets/tiles/*.svg files with your own tile SVGs; just make sure that you follow the existing filenames.

Finally, if you want jekyll-mahjong to overwrite those files with the built-in version every time you build your site (e.g., for updating the built-in version) In your _config.yml, you can add the following lines:

jekyll-mahjong:
  overwrite_SCSS: true # default: false
  overwrite_tiles: true # default: false

Usage and Demo

See here.

Credits

Code Author

Peter Gao

Uzaku Tile SVGs

Face-up Tile SVGs are originally from this Font. I ripped and reorganized the SVGs.