Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

SVG icon not rendered when sync to website

  • #6366
    Avatar photo[anonymous]

    Hi,

    I inserted the Facebook SVG icon in my post (Block Editor, HTML Block) using the same code as the Social Media share buttons in footer.hbs.

    The icon would render correctly in preview

    <svg viewBox="0 0 32 32">
       <path d="M30.234 0H1.766A1.766 1.766 0 0 0 0 1.766v28.468A1.766 1.766 0 0 0 1.766 32h15.326V19.608h-4.17v-4.83h4.17v-3.56c0-4.134 2.524-6.385 6.21-6.385a34.216 34.216 0 0 1 3.727.19v4.32h-2.557c-2.005 0-2.394.953-2.394 2.35v3.084h4.78l-.622 4.83h-4.16V32h8.154A1.766 1.766 0 0 0 32 30.234V1.766A1.766 1.766 0 0 0 30.234 0z"></path>
    </svg>

    However, when sync to website, the handlebar codes remained unrendered

    <svg><use xlink:href="{{@website.assetsUrl}}/svg/svg-map.svg#facebook"></use></svg>

    Thanks.

    #6367
    Avatar photoBob

    any URL?

    #6368
    Avatar photo[anonymous]
    This reply has been marked as private.
    #6369
    Avatar photoBob

    Ok, I got it. The problem is that you are trying to execute handlebars into the post body.

    {{@website.assetsUrl}}
    

    So, replace the above code with the absolute URL of your website. It should work.

    #6370
    Avatar photo[anonymous]
    This reply has been marked as private.
    #6371
    Avatar photo[anonymous]
    This reply has been marked as private.