Skip to content

Commit

Permalink
Quick go at adding opengraph + twitter image to landing page. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jul 24, 2024
1 parent 8069a4f commit eeac131
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file added app/assets/images/tailwind/opengraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/views/_tailwind/application/_html_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Planning Alerts
<% end %>
</title>
<%= yield :extra_meta_tags %>

<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand Down
17 changes: 17 additions & 0 deletions app/views/_tailwind/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
<% content_for :meta_description, Rails.configuration.planningalerts_meta_description %>

<% content_for :extra_meta_tags do %>
<!-- Facebook -->
<meta property="og:url" content="<%= root_url %>">
<meta property="og:type" content="website">
<meta property="og:title" content="Planning Alerts">
<meta property="og:description" content="<%= yield(:meta_description) %>">
<meta property="og:image" content="<%= image_url("tailwind/opengraph.png") %>">

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="planningalerts.org.au">
<meta property="twitter:url" content="<%= root_url %>">
<meta name="twitter:title" content="Planning Alerts">
<meta name="twitter:description" content="<%= yield(:meta_description) %>">
<meta name="twitter:image" content="<%= image_url("tailwind/opengraph.png") %>">
<% end %>

<%= render "banner" %>
<%= render "applications/address_search_form", q: nil, error: nil, autofocus: false %>

Expand Down

0 comments on commit eeac131

Please sign in to comment.