Rizal Renaldi

DRAFT
← Back

Transform arrow symbol in Nuxt Content v3

with transformers

dev

So I'm curious if this possible and inspired by Obsidian that auto convert -> into the arrow, can we somehow transform every -> into → in Nuxt Content v3 posts? Turns out we can, with transformers! I also added support for ⇒ and ←, and make sure that if it's wrapped with code, it will get ignored.

First we create the transformer file ~/transformers/transform-arrow.js.

and then in nuxt.config.ts we register the transformer:

I know this probably can be done within the IDE like VS Code with extension, or even simply copy paste the arrow symbol into the post. But I glad to know that this is possible to do with transformers.

The Blog of Rizal Renaldi

2025 © rizalrenaldi.com — Made with 🖖