Add opengraph to /<locale>/random/
This commit is contained in:
parent
5b10986d22
commit
09365dd283
3 changed files with 7 additions and 1 deletions
|
@ -18,6 +18,11 @@ module Mixin::OpenGraph
|
|||
description: t(context.locale, "meta.index.description"),
|
||||
url: "https://<%= hostname %>/#{context.locale}/",
|
||||
image: "https://<%= hostname %>/images/og/0.png"}
|
||||
when "random.html.erb"
|
||||
{title: t(context.locale, "TheNobleQuran"),
|
||||
description: t(context.locale, "meta.random.description"),
|
||||
url: "https://<%= hostname %>/#{context.locale}/random/",
|
||||
image: "https://<%= hostname %>/images/og/0.png"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
locales.each do |locale|
|
||||
compile "/html/main/random.html.erb", rep: "random/#{locale}" do
|
||||
context = Ryo.from({locale:})
|
||||
context = Ryo.from({filename: "random.html.erb", locale:})
|
||||
filter(:erb, locals: {locale:, locales:, context:})
|
||||
filter(:tidy)
|
||||
write("/#{locale}/random/index.html")
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<title><%= t(context.locale, "TheNobleQuran") %></title>
|
||||
<meta name="description" content="<%= t(locale, 'meta.random.description') %>">
|
||||
<%= erb("_revision.html.erb") %>
|
||||
<%= opengraph(context) %>
|
||||
<link
|
||||
rel="canonical"
|
||||
href="https://<%= hostname %>/<%= locale %>/random/"
|
||||
|
|
Loading…
Reference in a new issue