'How do I obtain the unified instance (or, list of plugins to reproduce the unified instance) used by nuxt content?

I am using Nuxt Content (v1).

As explained in the doc, internally, this library uses remark and rehype, for parsing and converting markdown file to html AST. https://content.nuxtjs.org/configuration

Now, I have a string which I'd like to parse and transform using the unified instance which Nuxt Content uses. Example usecase is to parse string defined in front-matter as an markdown, so that e.g. following can be parsed and turned into html the same way as in markdown content.

description: "About `export { default } from 'lib'` statement."
desiredDescription: "About <code>export { default } from 'lib'</code> statement."

Although "using same unified parse/convert logic" can be achieved by manually listing all the plugins by oneself and using it by e.g. remarkPlugins: () => listOfAllRemarkPlugins in nuxt.config.js, since Nuxt Content comes with handy default plugins and its configurations, I would want to rather reuse them, not handling all the plugins manually by myself.

So question: Can I obtain the unified instance, or list of plugins and its options, used by Nuxt Content so that I can do the same transformation against markdown strings as Nuxt Content does against markdown file contents?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source