DFE-Digital / rails-template

Rails 7 template with GOV.UK Frontend
27 stars 5 forks source link

layouts `og:image` property's `content` attribute outputs `asset_path` as string, not interpreted #25

Open jsugarman opened 1 year ago

jsugarman commented 1 year ago

see code line

This line

    <%%= tag :meta, property: 'og:image', content: asset_path('images/govuk-opengraph-image.png') %>

generates html

<meta property="og:image" content="asset_path('images/govuk-opengraph-image.png')">

To fix we need it to interpret the asset_path i imagine so the resulting html looks something like:

<meta property="og:image" content="/assets/images/govuk-opengraph-image-7802ee6164ac49920a8f1a71a3d148dc70e23963.png">
peteryates commented 11 months ago

This seems like it's working to me now @jsugarman. Sorry for the massive delay, nobody's been keeping an eye on this repo.

image