Skip to content

Commit

Permalink
Merge pull request #5 from voxmedia/ls-promo-image-fix
Browse files Browse the repository at this point in the history
fix: mainImage may be nil
  • Loading branch information
lsirivong authored Nov 20, 2024
2 parents a547d07 + 48b26d2 commit 4fcb95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/source/layouts/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<meta name="parsely-title" content="<%= data.content.pages.first.hed %>">
<meta name="parsely-link" content="<%= data.content.entry.url %>">
<meta name="parsely-type" content="post">
<meta name="parsely-image-url" content="<%= data.content.pages.first.mainImage.croppedSrc %>">
<meta name="parsely-image-url" content="<%= data.content.pages.first&.mainImage&.croppedSrc %>">
<meta name="parsely-pub-date" content="<%= DateTime.parse(data.content.entry.firstPublishedAt).iso8601 %>">
<meta name="parsely-section" content="<%= data.content.entry.primaryCommunityGroup.slug %>">
<meta name="parsely-author" content="<%= data.content.entry.frontend.analyticsDataLayer['Author'] %>">
Expand All @@ -84,4 +84,4 @@
<%= partial('layouts/_concert') %>
<%= yield %>
</body>
</html>
</html>

0 comments on commit 4fcb95b

Please sign in to comment.