I have the following front matter in YAML:
about:
about_hero:
heading: "About Us"
text: >-
Some copy that makes up a paragraph.
Some copy that makes up another paragraph.
about_team:
From what I understand the >-
symbol indicates that what follows is a markdown block. If true, then I would expect the following:
{{ with .Params.about.about_hero.text }}
{{ . | markdownify }}
{{ end }}
To output something like:
<p>Some copy that makes up a paragraph.</p>
<p>Some copy that makes up another paragraph.</p>
What is output however is the following:
Some copy that makes up a paragraph. Some copy that makes up another paragraph.
Am I missing something, or is this simply not possible? For some additional context, I am using Hugo with NetlifyCMS and so, my aim is to have the content of the site defined inside front matter. As some pages are complex, it would be great if my above use case can work.
The alternative is to do something like:
about:
about_hero:
heading: "About Us"
text: "Some copy that makes up a paragraph."
text_cont: "Some copy that makes up another paragraph."
about_team:
And then in the template:
{{ with .Params.about.about_hero.text }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.about.about_hero.text_cont }}
<p>{{ . }}</p>
{{ end }}
This feels so verbose. Consider for exmaple if there are 4 or more paragraphs. This also means that in the NetlifyCMS UI, there would be a separate input element for each paragraph and no markdown formatting would be possible.
Perhaps that is the case, but I thought I would reach out to the community and make sure. I am hoping there is a way to make this work. Thank so much in advance.