danurbanowicz / eleventy-netlify-boilerplate

A template for building a blog with the Eleventy static site generator and Decap CMS
https://eleventy-netlify-boilerplate.netlify.app/
MIT License
531 stars 183 forks source link

Markdown widget not wrapping output with HTML #8

Closed danpantinople closed 5 years ago

danpantinople commented 5 years ago

Hi, I'm using your boilerplate for my project and is using many markdown widgets on a single collection.

In my config.yml, i have this as one of my fields: - { label: "Description", name: "featureDescription", widget: "markdown" } I have a multi-paragraph content which then saves to my file.md's frontmatter like this: image

and using {{ projectInformation.projectDescription }} it gets displayed in my site like this: image

Also saw this in the netlifycms doc: Please note: The markdown widget outputs a raw markdown string. Your static site generator may or may not render the markdown to HTML automatically. Consult with your static site generator's documentation for more information about rendering markdown.

Can you help me out? Thanks!

danurbanowicz commented 5 years ago

I think you're going to need to use a markdown filter like markdown-it to do what you're asking.

Here is an example of it being configured with Eleventy, it may help.

danpantinople commented 5 years ago

@danurbanowicz thanks for the reply but the thing is its already in eleventy.js image

danpantinople commented 5 years ago

Actually that helped! thanks @danurbanowicz

danurbanowicz commented 5 years ago

I'm closing this issue now but feel free to add a comment if you haven't managed to find a solution and I will re-open it for you :+1: