Add opengraph to root path

Default to the canonical (/en/) for the
title, description, and images.
This commit is contained in:
0x1eef 2024-05-16 17:00:53 -03:00
parent a966e8a8e2
commit d299621488
3 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@ module Mixin::OpenGraph
description: t(context.locale, "meta.stream.description", surah_name: surah.name),
url: "https://al-quran.reflectslight.io/#{context.locale}/#{surah.slug}/",
image: "https://al-quran.reflectslight.io/images/og/#{surah.id}.png"}
when "surah-index.html.erb"
when "redirect.html.erb", "surah-index.html.erb"
{title: t(context.locale, "TheNobleQuran"),
description: t(context.locale, "meta.index.description"),
url: "https://al-quran.reflectslight.io/#{context.locale}/",

View file

@ -1,6 +1,6 @@
<meta property="og:type" content="article"/>
<meta property="og:title" content="<%= title %>"/>
<meta property="og:description" content='<%= description %>'/>
<meta property="og:description" content="<%= description %>"/>
<meta property="og:url" content="<%= url %>"/>
<meta property="og:image" content="<%= image %>"/>
<meta property="og:image:type" content="image/png"/>

View file

@ -13,6 +13,7 @@
hreflang="<%= locale %>" />
<% end %>
<%= erb("_favicon.html.erb") %>
<%= opengraph(Ryo(filename: "redirect.html.erb", locale: "en")) %>
</head>
<body>
<script src="/js/main/redirect.js"></script>