I create my markdown files in JSON (instead of yaml or toml). And I place the main content / body as a value of a json key. I call that value via params variables.
It works reasonably well. EXCEPT when that content includes the newline character
There is nothing terrible happening. There just is no newline or
<p> in the generated html. The sentences are all together in one line which is not visually appealing.
Has anyone dealt with this problem? What was your hack / solution?
- I have tried this solution. But having double slashes or
\\nappearing the generated html which is a worse outcome.
- Including multiple
\nhas no effect at all on generated html.
- I have tried writing newline as unicode with this
\u000dbased on this proposal. But it doesn’t work and has not noticeable effect.
U+000Abased on this has not noticeable effect either.
- Apart from this, hugo handles unicode characters in the JSON value well.