npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hexo-zhruby

v1.2.0

Published

Hexo Tag Plugin for html tag <ruby>. Provide auto pronounciation indication for Jyutping (Cantonese), Zhuyin (Taiwanese Mandarin), and Pinyin (Chinese Mandarin). Support Traditonal and Simplified Chinese characters.

Downloads

81

Readme

hexo-zhruby

npm types license

Implement the HTML tag <ruby> for Hexo using Tag Plugin feature. Provide auto pronounciation indication for Jyutping (Cantonese), Zhuyin (Taiwanese Mandarin), and Pinyin (Chinese Mandarin), and the default setting for general usage. Support Traditonal and Simplified Chinese characters.

Inspired by the hexo-ruby-character by jamespan.

Install

npm install hexo-zhruby --save

Use cases

Ruby (ルビ) is also known as Furigana (振り仮名). It contains two basic use cases:

  1. To clarify or indicate the pronunciation for readers
  2. Gikun, in which the characters have different pronunciations than they seem due to convention or for a specific context. For example, the pronunciation of 煙草 in Japanese is tabako (tobacco).

Usage

TLDR: Usage: {% tag rb|rt %}; Tag options: ruby_def, ruby_jy, ruby_py, ruby_zy.


For the 1st use case (pronunciation indication):

ruby_def allows any language, and the spacing in rp will expand evenly with respect to the word length in rt.

  • {% ruby_def 基本|きほん %}基本 (きほん)
  • {% ruby_def 基本|기본 %}基本 (기본)
  • {% ruby_def 基本|fundamental %}基本 (fundamental)
  • {% ruby_def 基本|θεμελιώδες %}基本 (θεμελιώδες)
  • {% ruby_def 基本|базовый %}基本 (базовый)
  • {% ruby_def 基本|základní %}基本 (základní)
  • {% ruby_def fundamental|基本 %}fundamental (基本)

ruby_jy, ruby_py, ruby_zy refers to Jyutping, Pinyin, Zhuyin respectively.

No need to enter the pronunciation manually in rt; the value will automatically be returned.

  • {% ruby_zy 基本 %}基本 (ㄐㄧ ㄅㄣˇ)
  • {% ruby_py 基本 %}基本 (jī běn)
  • {% ruby_jy 基本 %}基本 (gei1 bun2)

For the 2nd use case (Gikun):

Same usage for ruby_def.

  • {% ruby_def special|basic %}special (basic)
  • {% ruby_def 特別|基本 %}特別 (基本)

In ruby_jy, ruby_py, ruby_zy, you can also add |rt just like ruby_def.

  • {% ruby_zy 特別|special %}特別 (special)
  • {% ruby_py 特別|special %}特別 (special)
  • {% ruby_jy 特別|special %}特別 (special)
  • {% ruby_zy 特別|基本 %}特別 (ㄐㄧ ㄅㄣˇ)
  • {% ruby_py 特別|基本 %}特別 (jī běn)
  • {% ruby_jy 特別|基本 %}特別 (gei1 bun2)

Notice that the rt output depends on the pronunciation in rt, but not rp. This feature is only available when rt is a Chinese Character in CJK Unified Ideographs (\U4E00-\U9FFF).

If the input of rt is not in CJK Unified Ideographs, it is considered as ruby_def.

Known issues

The Chinese language contains a lot of Homophones, which can be resolved by context most of the time. However, for long sentences (>= 15 characters), or very specific names and terms, the auto-generation from 1st use case may not be very sensitive.

Please use ruby_def if it happens or contribute to this project by providing a more sensitive or advanced Chinese vocabulary library.

References