caressofsteel/hugo-story

YAML pipe behavior

Closed this issue · 2 comments

Please help me to understand what I am doing wrong with the pipe (|) in my banner.yml:

https://github.com/egLanghaus/granadaCircle/blob/main/egkreis/data/banner.yml

I want those two sentences to be on separate lines. If you serve the site locally or view it at egkreis.net, you can see that the newlines are treated as spaces.

What am I doing wrong? Is there a better way to get those sentences on separate lines?

EDIT: perhaps I am not entering newlines at all? But then how would Vim or GitHub know to display them as separate lines...are different chars needed?

I'm going off memory, but it's likely a YAML formatting issue. You'll want to search the following keywords (hugo yaml linebreak) to aid you in solving the problem. Refer to THIS page. Take a look at THIS one too. You could also try to use regular HTML tags in the content such as <br /> which should work.

I have settled for <br/>, which is perfectly fine. Thanks!