cliid / rehype-twemojify

A simple rehype plugin that converts your ordinary text emojis into fancy twemojis. Full customization available.
MIT License
3 stars 4 forks source link

How does one use this? #3

Open dvlden opened 2 years ago

dvlden commented 2 years ago

I checked the code, cause there are no docs in README, or anywhere really.

Seems like I just call the plugin with the rest and seems like Next is default framework type. However with or without config options set, I still get the error that width and height needs to be defined or layout=fill.

Seems like options are not working, no matter what I do.

cliid commented 2 years ago

Sorry for the inconvenience. I was going to add a docs to the README, but since I had lots of schoolwork to do, I couldn't. Anyway, if you look at the test/index.test.ts file, you can see how to call the plugin.

{ twemoji: { size: 'svg' } }
{ framework: { type: 'next' } }

or

{ framework: { type: 'next', params: { w: 3840, q: 100 } } }