Skip to content

gledos/Jekyll-furigana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jekyll-furigana

Latest release license language made with <3

GitHub Pages compatible transcription templates (furigana) without plugins or JavaScript, Use only liquid template language.

无需 jekyll 插件或 JavaScript 实现的 GitHub Pages 注音效果,仅使用 liquid 模板语言

Want anchors next to your Jekyll headings without JavaScript or a plug-in?

Check out the sister project over at allejo/jekyll-anchor-headings allejo/jekyll-toc

Usage

  1. Download the furigana.html file from the master branch.
  2. Move file to your _includes folder.
  3. Like the code below, use this template:
{% include furigana.html text="漢字" furigana="かんじ" %}
{% include furigana.html text="漢,字" furigana="かん,じ" type="B" %}

{% include furigana.html text="测试" furigana="test" %}
{% include furigana.html text="测,试" furigana="cè,shì" type="B" %}

Parameters

This snippet is highly customizable. Here are the available parameters to change the behavior of the snippet.

Parameter Type Default Description
text string "no_text" Text in Kana or Chinese characters to be annotated
furigana string "no_furigana" Hiragana, romanization or other transcription; shown above the Base text
class string "null" a CSS class to the tag
type string "A" single word single furigana
when input "B": more word more furigana

Performance

The performance impact of this code snippet on your website is negligible. The following statistics are from Jekyll's --profile option.

| Filename                                   | Count |    Bytes |  Time |
---------------------------------------------+-------+----------+--------

# A total of 732 Phonetic in Version 0.1.0
| _includes/furigana.html                    |   732 |   47.98K | 0.054 |

命名问题

关于为什么使用 furigana,还是因为这个词语相对更普遍,当然不只是可以用作日本汉字的标注假名使用,各种音标也能使用。

License

This snippet may be redistributed under either the MIT licenses.

About

GitHub Pages compatible transcription templates (furigana) without plugins or JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published