Skip to content

Ruby/Furigana Support #416

Answered by yhatt
MichaelCharles asked this question in Ideas
Discussion options

You must be logged in to vote

Marp's plugin architecture is just for that. You can add a custom furigana syntax to Marp by using markdown-it plugins: https://www.npmjs.com/search?q=markdown-it%20ruby

You must use Marp CLI whenever using any plugins.

Example: markdown-it-ruby

`markdown-it-ruby` を{使|つか}うと、このような{構文|こうぶん}を{使用|しよう}して、{漢字|かんじ}にルビを{振|ふ}ることができます。

Marp は{汎用性|はんようせい}の{高|たか}いエコシステムとして{設計|せっけい}されているため、CommonMark {外|がい}の Markdown {構文|こうぶん}に{関|かん}して、{独自|どくじ}の{意見|いけん}を{持|も}つことを{極力|きょくりょく}{避|さ}けています。{必要|ひつよう}に{応|おう}じて、ユーザーがプラグインを{使|つか}うことで Markdown {構文|こうぶん}が{拡張|かくちょう}されるべきです。
// engine.js
module.exports = ({ marp }) => marp.use(require('markdown-it-ruby'));
npm i --save markdown-it-ruby
marp --engine ./engine.js ja…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MichaelCharles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
2 participants