An MkDocs plugin to add pinyin/furigana to Chinese/Japanese Kanji text.
Project description
mkdocs-ruby-plugin
An MkDocs plugin to add pinyin/furigana to Chinese/Japanese Kanji text.
It's based on https://github.com/ijaureguialzo/mkdocs-furigana-plugin, but replace CSS style with HTML <ruby>
tag.
Installation
pip3 install mkdocs-ruby-plugin
Or
pip3 install https://github.com/lesliezhu/mkdocs-ruby-plugin/archive/refs/heads/master.zip
Usage
Write kanji like this:
我(wo)是一只{猫(mao)}。猫(ねこ).
It will look like:
我wo是一只猫mao。猫ねこ.
Or like this when there is more than one character:
我(wo)是{一只猫(yizhimao)}。{綺麗猫(きれいねこ)}.
It will look like:
我wo是一只猫yizhimao。綺麗猫きれいねこ.
To enable the plugin in the mkdocs.yml
file:
plugins:
- ruby:
global_enable: True
outer_begin: '{'
outer_end: '}'
inter_begin: '('
inter_end: ')
If ruby.global_enable = False
, you can enable this plugin in single page:
---
ruby: true
---
If ruby.global_enable = True
, you can disable this plugin in single page:
---
ruby: false
---
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs_ruby_plugin-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5993f4c65325cdfaedbf1a9a31c0b1dec32c5c77fbcb42a0852628fa342223a4 |
|
MD5 | c050208de24a818bc371ac5c989738f8 |
|
BLAKE2b-256 | 0678862e596497ce984a39284461905035b57de1f7d0b534bbcefaf97daed01a |