I have a few items in my frontmatter which have long descriptions. I’d like to add line breaks to the descriptions instead of it being one long string. How is this done? Adding works but it’s a pretty hacky way to do it.
I’ve been looking to the YAML way to do it (link here) and apparently it should be done like so:
description: |
here's a loong description
which spans multiple lines
However, this doesn’t work in Grav. What’s the Grav way to do it?
To clarify, what I meant was that the /n is a line break so that’s correct, but the parser isn’t parsing it into a new line for some reason in the front-end.
I think the multiline string is working, but the problem lies on the Twig end how you print out the variable. By default web browsers are whitespace/newlines agnostic, meaning you have to convert all line breaks into their corresponding markup (here: <br>, see http://twig.sensiolabs.org/doc/filters/nl2br.html ). Thus the Twig one liner should do the job