Skip to content

Commit 8f2992d

Browse files
committed
Use canonical URL in opengraph tags instead of web URL
This ensures that a content item with parts will have the correct URL.
1 parent 95d5569 commit 8f2992d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/layouts/application.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<meta property="og:site_name" content="GOV.UK" />
3131
<meta property="og:type" content="article" />
32-
<meta property="og:url" content="<%= @content_item.web_url %>" />
32+
<meta property="og:url" content="<%= @content_item.canonical_url %>" />
3333
<meta property="og:title" content="<%= @content_item.page_title %>" />
3434
<meta property="og:description" content="<%= strip_tags(@content_item.description) %>" />
3535

0 commit comments

Comments
 (0)