/logseq-furigana

A small plugin to add markdown support for furigana (ruby tags)

Primary LanguageTypeScriptMIT LicenseMIT

My other plugins

Logseq Furigana

demo video

If you ๐Ÿ’œ what I'm doing - you can support my work ๐Ÿต

Features

Choose if you want to modify your notes or not:

  • Slash command to transcribe from Markdown Furigana to HTML Ruby tags.
    • Modifies your notes but you can read them without having the plugin installed.
  • Markdown rendering to show ruby tags without modifying your notes
    • Just write something like {ๆผขๅญ—|ใ‹ใ‚“ใ˜} and it will show us as furigana

Parsers

  • There are multiple ways of writing the ใตใ‚ŠใŒใชfurigana:
    • Round parentheses: An old classic: ใ“ใ‚Œใฏ ๆผขๅญ—๏ผˆใ‹ใ‚“ใ˜๏ผ‰ใงใ™
      • โš ๏ธ Keep in mind that these are JAPANESE parentheses. You have to use your japanese input method.
    • Anki way: Like this ใ“ใ‚Œใฏ ๆผขๅญ—[ใ‹ใ‚“ใ˜]ใงใ™
    • Spectacle parentheses: ใ“ใ‚Œใฏ ๆผขๅญ—ใ€ใ‹ใ‚“ใ˜ใ€‘ใงใ™
    • Obsidian's plugin way, based on a markdown-it extension (recommended)
      • Uses two brackets to enclose the whole compound: ใ“ใ‚Œใฏ{ๆผขๅญ—|ใ‹ใ‚“ใ˜}ใงใ™
  • You might need to put an space to separate compounds.
  • Use extra | to show the furigana of each kanji of the word:
    • ๆผขๅญ—[ใ‹ใ‚“|ใ˜] or {ๆผขๅญ—|ใ‹ใ‚“|ใ˜}

How to develop

  1. Clone the repository
  2. Make sure you have pnpm installed, install if necessary ๐Ÿ› 
  3. Execute pnpm install ๐Ÿ“ฆ
  4. Execute pnpm build to build the plugin ๐Ÿšง
  5. Enable developer-mode in Logseq, go to plugins, select "Load unpacked plugin" ๐Ÿ”Œ
  6. Select the directory of your plugin (not the /dist-directory, but the directory which includes your package.json) ๐Ÿ“‚
  7. Enjoy! ๐ŸŽ‰

Acknowledgments