Parsing Markdown inside YAML section of FrontMatter
See original GitHub issueIs it possible to also parse markdown in other parts that are not the “body” of a Markdown file. I’m doing some tests with NetlifyCMS and I have different sections in one page, and some have markdown inside. They get saved to a markdown format inside the YAML part of the .md, like:
---
hero:
title: This will be the hero text
services:
- title: This is a title of the first service
description: Description of this service
explanation: >-
* **First** item text
* **Second** item text
* **Second** item text
- title: This is a title of the second service
description: Description of this service
explanation: >-
* **First** item text
* **Second** item text
* **Second** item text
---
# Here I have some more text of the body
I would like Nuxt Content to also parse the explanation ul list 😃
Thanks so much for your great job!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Rendering Markdown to HTML and Parsing YAML Front ...
First of all, to parse the YAML front matter, I used the YamlDotNet NuGet package. It's a little bit fiddly, but you can...
Read more >yaml_front_matter: Parse the YAML front matter from a file
Arguments ; input. Input file (Rmd or plain markdown) ; encoding. Ignored. The encoding is always assumed to be UTF-8.
Read more >Parse Markdown Front Matter With C# | Khalid Abuhakmeh
This blog contains all post metadata in a terse front matter block. In this post, you'll see how we can use YAML.NET and...
Read more >yaml-front-matter - crates.io: Rust Package Registry
YAML Front Matter (YFM) parser for Markdown files. ... This crate takes care of extracting this header from your markdown file and parse...
Read more >Parsing YAML Front matter in Java - Stack Overflow
The yaml front matter is everything that is inside the lines with three dashes ( --- ). YAML Front matter is ALWAYS at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @santicros,
Unfortunately this is not possible at the moment, we’re depending on gray-matter to parse the front-matter which doesn’t seem to support this.
Maybe you can ask them if they plan to support it?
hmm, I’m looking for a way to pass a parameter (containing the field(s) to be treated as markdown) from
$content(path, options.tomarkdown)
to the markdown parserstoJSON()
function, but I didn’t find a way to do this so far.