Hello, friends!
Is it technically possible and correct to write several paragraphs within Front Matter value? e.g.:
valueName: "Long Paragraph 1
Long paragraph 2
End of the string"
I want to do something like that. Tried to write something like \n , but it does not help.
Expected output = just several paragraphs in <p>tag each.
Iām trying to write \n but it does not create new lines.
Iām trying to store paragraphs within my markdown articles front matter, not yaml config file. Is it somehow related?
Also, within my template files I just render content like {{ .Content }}, maybe I should write extra parameters, like Markdownify or something?
content/example.md
---
title: Example
params:
quotation:
text: |
Imagination is more **important** than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution.
It is, strictly speaking, a real factor in scientific research.
attribution: Albert Einstein
---
layouts/_partials/quotation.html
<figure>
<blockquote>
{{ .Params.quotation.text | .RenderString (dict "display" "block") }}
</blockquote>
<figcaption>ā {{ .Params.quotation.attribution }}</figcaption>
</figure>
rendered:
<figure>
<blockquote>
<p>Imagination is more <strong>important</strong> than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution.</p>
<p>It is, strictly speaking, a real factor in scientific research.</p>
</blockquote>
<figcaption>ā Albert Einstein</figcaption>
</figure>