I'm creating a simple blogging platform using Vue that serves up Markdown (*.md) files for the posts. On the main page, I want to show a list of the published posts as well as a preview of the first 30 words in each post. This is the function I have so far to show the preview (front-matter just parses out some meta data I have at the top of of the file, and postData just contains the text from the Markdown file):
import fm from "front-matter";
function postPreview() {
var fmData = fm(postData).body;
var words = fmData.split(" ");
return words.slice(0, 30).join(" ");
}
The problem is, if the Markdown has image tags or link tags, then it displays those when I just want to display the raw text. For example, if this is my Markdown file:
 Here is a [link](link-to-some-website) in my file.
Then the preview should just look like this:
Here is a link in my file.
Is there some library that will let me do this?
front-matterpackage, it looks like it is for YAML, not markdown. Asking for recommendations for packages is off-topic. Pick a markdown parser, try to use it, and come back with attempt at that.