mkdocs-ruby-plugin


Namemkdocs-ruby-plugin JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/lesliezhu/mkdocs-ruby-plugin
SummaryAn MkDocs plugin to add pinyin/furigana to Chinese/Japanese Kanji text.
upload_time2024-08-27 13:32:10
maintainerNone
docs_urlNone
authorLeslie Zhu
requires_python>=3.9
licenseApache-2.0
keywords mkdocs ruby plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

> <ruby>我<rt>wo</rt></ruby>是一只<ruby>猫<rt>mao</rt></ruby>。<ruby>猫<rt>ねこ</rt></ruby>.

Or like this when there is more than one character:

> 我(wo)是{一只猫(yizhimao)}。{綺麗猫(きれいねこ)}.

It will look like:

> <ruby>我<rt>wo</rt></ruby>是<ruby>一只猫<rt>yizhimao</rt></ruby>。<ruby>綺麗猫<rt>きれいねこ</rt></ruby>.

To enable the plugin in the `mkdocs.yml` file:

```yaml
plugins:
  - ruby:
      global_enable: true
      title_enable: true
      outer_begin: '{'
      outer_end: '}'
      inter_begin: '('
      inter_end: ')
```

If `ruby.global_enable = false`, you can enable this plugin in single page:


```markdown
---
ruby: true
---
```

If `ruby.global_enable = true`, you can disable this plugin in single page:


```markdown
---
ruby: false
---
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lesliezhu/mkdocs-ruby-plugin",
    "name": "mkdocs-ruby-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mkdocs ruby plugin",
    "author": "Leslie Zhu",
    "author_email": "pythonisland@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/95/41/c5011011bb563c2a388a066de7b5c1f03e6eebb6e60c0439f574e198dbb5/mkdocs-ruby-plugin-0.0.3.tar.gz",
    "platform": null,
    "description": "# mkdocs-ruby-plugin\n\nAn MkDocs plugin to add pinyin/furigana to Chinese/Japanese Kanji text.\n\nIt's based on https://github.com/ijaureguialzo/mkdocs-furigana-plugin, but replace CSS style with HTML `<ruby>` tag.\n\n\n## Installation\n\n```\npip3 install mkdocs-ruby-plugin\n\nOr\n\npip3 install https://github.com/lesliezhu/mkdocs-ruby-plugin/archive/refs/heads/master.zip\n```\n\n## Usage\n\nWrite kanji like this:\n\n> \u6211(wo)\u662f\u4e00\u53ea{\u732b(mao)}\u3002\u732b(\u306d\u3053).\n\nIt will look like:\n\n> <ruby>\u6211<rt>wo</rt></ruby>\u662f\u4e00\u53ea<ruby>\u732b<rt>mao</rt></ruby>\u3002<ruby>\u732b<rt>\u306d\u3053</rt></ruby>.\n\nOr like this when there is more than one character:\n\n> \u6211(wo)\u662f{\u4e00\u53ea\u732b(yizhimao)}\u3002{\u7dba\u9e97\u732b(\u304d\u308c\u3044\u306d\u3053)}.\n\nIt will look like:\n\n> <ruby>\u6211<rt>wo</rt></ruby>\u662f<ruby>\u4e00\u53ea\u732b<rt>yizhimao</rt></ruby>\u3002<ruby>\u7dba\u9e97\u732b<rt>\u304d\u308c\u3044\u306d\u3053</rt></ruby>.\n\nTo enable the plugin in the `mkdocs.yml` file:\n\n```yaml\nplugins:\n  - ruby:\n      global_enable: true\n      title_enable: true\n      outer_begin: '{'\n      outer_end: '}'\n      inter_begin: '('\n      inter_end: ')\n```\n\nIf `ruby.global_enable = false`, you can enable this plugin in single page:\n\n\n```markdown\n---\nruby: true\n---\n```\n\nIf `ruby.global_enable = true`, you can disable this plugin in single page:\n\n\n```markdown\n---\nruby: false\n---\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "An MkDocs plugin to add pinyin/furigana to Chinese/Japanese Kanji text.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/lesliezhu/mkdocs-ruby-plugin"
    },
    "split_keywords": [
        "mkdocs",
        "ruby",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "546cdd028c077910ba6249c1f66457c2cdcdf55c7b3185ff7143c4c7a4c8081e",
                "md5": "ea258c2c809a82324d8525ddb11dac8d",
                "sha256": "5cfc7578d583a103bd1e19f281be3ecba7b480c6484bd9ceffc53c1b8413bfb2"
            },
            "downloads": -1,
            "filename": "mkdocs_ruby_plugin-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea258c2c809a82324d8525ddb11dac8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7461,
            "upload_time": "2024-08-27T13:32:01",
            "upload_time_iso_8601": "2024-08-27T13:32:01.435970Z",
            "url": "https://files.pythonhosted.org/packages/54/6c/dd028c077910ba6249c1f66457c2cdcdf55c7b3185ff7143c4c7a4c8081e/mkdocs_ruby_plugin-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9541c5011011bb563c2a388a066de7b5c1f03e6eebb6e60c0439f574e198dbb5",
                "md5": "bc3ee593b0d2e00421dfeabb6195a773",
                "sha256": "3e4434f6248e67f4f78292d34594a6943b203dcf69c1f5bdb62eb4cdca3e6879"
            },
            "downloads": -1,
            "filename": "mkdocs-ruby-plugin-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "bc3ee593b0d2e00421dfeabb6195a773",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6814,
            "upload_time": "2024-08-27T13:32:10",
            "upload_time_iso_8601": "2024-08-27T13:32:10.675724Z",
            "url": "https://files.pythonhosted.org/packages/95/41/c5011011bb563c2a388a066de7b5c1f03e6eebb6e60c0439f574e198dbb5/mkdocs-ruby-plugin-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 13:32:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lesliezhu",
    "github_project": "mkdocs-ruby-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mkdocs-ruby-plugin"
}
        
Elapsed time: 0.29296s