Skip to content

Commit

Permalink
[WIP] metadata block
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Nov 13, 2024
1 parent 9c4b27f commit 4f2a886
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/views/landing_page/blocks/_metadata.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<% content_for :extra_headers do %>
<meta name="description" content="<%= block.data["description"] %>" />
<meta property="og:title" content="<%= block.data["title"] %>">
<meta property="og:description" content="<%= block.data["description"] %>">
<meta name="twitter:card" content="summary_large_image">

<meta property="og:url" content="<%= block.data["page_url"] %>">
<meta property="og:image" content="<%= featured_image %>">
<meta name="twitter:image:alt" content="<%= block.data["featured_image_alt"] %>">

<meta property="og:site_name" content="GOV.UK">
<% end %>
6 changes: 6 additions & 0 deletions lib/data/landing_page_content_items/homepage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ navigation_groups:
- text: Be thankful
href: "/landing-page/be-thankful"
blocks:
- type: metadata
page_url: "/landing-page/homepage"
featured_image: landing_page/placeholder/desktop.png
featured_image_alt: a grey placeholder image
title: "Add title here to override Whitehall"
description: "Add description here to override Whitehall"
- type: main_navigation
navigation_group_id: Top Menu
- type: hero
Expand Down

0 comments on commit 4f2a886

Please sign in to comment.