Closed johannesholmberg closed 5 years ago
Hey @johannesholmberg
You'll need to use a library such as marked to parse the markdown into HTML.
For example (assuming that node.description
is markdown):
// in gridsome.config.js
const marked = require('marked')
// inside gridsome-plugin-rss options
feedItemOptions: node => ({
title: node.title,
description: marked(node.description),
url: 'https://superblog.com/post/' + node.slug,
author: node.fields.author
}),
@darthmeme
Thanks for helping out. Works like a charm 👍
If I would like to generate the whole output of a post in the description, how do I do it?
node.content
puts out the raw markdown of the post, but how can I convert it to HTML before putting it out?Thanks! @darthmeme