content
content copied to clipboard
How to display markdown from nuxt/content in server side route outside component
Hello, i've created a server route in nuxt 3 app for render a xml RSS feed for podcast. The content come from nuxt/content but when i want rendered the body, i can't find how to make this.
The file in the project https://github.com/double-slash-podcast/website/blob/969fe4bfa9f16097ce4def7d922b8869377a650a/server/routes/podcast-rss-feed.xml.ts#L164
thanks for help.
i find this method :
await renderToString(h(ContentRenderer, {value: body}));
but i don't find how to import ContentRenderer
Hey @ipatate
I believe the Islands components might be the solution for it: https://github.com/nuxt/framework/pull/5689
It will soon land 😊
The idea of using ContentRenderer is nice but as soon as you have Vue components inside, it will loose the ability to find them, this is where the island components come in!
okay @Atinux. Island component, interesting 👍 thanks At the moment I'm having a really hard time using nuxt/content outside of the application. Maybe, it's not thinking for that.
@ipatate
It would be also worth checking #1177, as a solution for the time being.
thanks @NozomuIkuta, i tried this method and it's works.