ZgotmplZ instead of CSS rule when rendering page

Having trouble parsing front matter strings when using parentheses in the values. I’m trying to inline a CSS gradient to a HTML partial but I can’t get it to print correctly. I tried using Markdown & TOML escape methods, unicode/HTML encoding with no luck.

Front Matter

+++
headerGradient = 'linear-gradient(-112deg, rgb(74, 190, 223), rgb(102, 51, 153))'
+++

Partial

<header style="background: {{ .Params.headerGradient }}; >

result

background: ZgotmplZ;
<header style="background: {{ .Params.headerGradient | safeCSS }};">
1 Like

Thank you. I can’t believe I didn’t come across this.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.