Reputation: 141
I'm implementing Google strctured data using Ember and adding some dynamic values
<script type="application/ld+json">
[{
"@context": "{{my-ember-hbs}}",
...
The rendered html is:
<script type="application/ld+json">
[{
"@context": " // ember adds new line before and after
rendered-value-string
",
...
Upvotes: 0
Views: 219
Reputation: 2459
According the the Handlebars docs you can eliminate white space with a tilde ~
.
<script type="application/ld+json">
[{
"@context": "{{~my-ember-hbs~}}",
...
{{my-ember-hbs}}
may also have white space internally that you would need to account for.
Upvotes: 1