Skip to content

Commit

Permalink
Fix render of _opengraph.html.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1eef committed Sep 14, 2024
1 parent a5f6604 commit e7d1241
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions share/al-quran.reflectslight.io/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

** vNEXT

**** Fix ~_opengraph.html.erb~ typos
Fix multiple issues with the render of ~_opengraph.html.erb~

**** Replace font-size rules with tail.css classes
This change replaces custom 'font-size' rules with standard
tail.css classes (eg text-lg, etc)
Expand Down
4 changes: 3 additions & 1 deletion src/html/_opengraph.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta property="og:type" content="article"/>
<meta property="og:title" content="<%= t(context.locale, 'TheNobleQuran') %>"/>
<meta property="og:description" content="<%= context.surah.name %>"/>
<meta property="og:url" content="<%= base_url %>/<%= context.locale %>/<%= context.surah.urlname %>/"/>
<meta property="og:url" content="<%= base_url %>/<%= context.locale %>/<%= context.surah.urlName %>/"/>
<meta property="og:image" content="<%= base_url %>/images/og/<%= context.surah.id %>.png?v=<%= commit %>"/>
<meta property="og:image:type" content="image/png"/>
<% elsif file == "random.html.erb" %>
Expand All @@ -19,4 +19,6 @@
<meta property="og:url" content="<%= base_url %>/<%= context.locale %>/random/"/>
<meta property="og:image" content="<%= base_url %>/images/og/0.png?v=<%= commit %>"/>
<meta property="og:image:type" content="image/png"/>
<% else %>
<% error! "unknown file: #{file}" %>
<% end %>
2 changes: 1 addition & 1 deletion src/html/main/redirect.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title><%= t("en", "TheNobleQuran") %></title>
<meta name="description" content="<%= t('en', 'meta.index.description') %>">
<%= erb("_version.html.erb") %>
<%= erb("_opengraph.html.erb", {page: "redirect.html.erb", context:}) %>
<%= erb("_opengraph.html.erb", {file: "redirect.html.erb", context:}) %>
<link rel="canonical" href="<%= base_url %>/en/" />
<% locales.each do |locale| %>
<link
Expand Down
2 changes: 1 addition & 1 deletion src/html/main/surah-stream.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta charset="UTF-8">
<meta name="description" content="<%= t(context.locale, 'meta.stream.description') %>">
<%= erb("_version.html.erb") %>
<%= erb("_opengraph.html.erb", {file: "stream-stream.html.erb", context:}) %>
<%= erb("_opengraph.html.erb", {file: "surah-stream.html.erb", context:}) %>
<link
rel="canonical"
href="<%= base_url %>/<%= context.locale %>/<%= context.surah.urlName %>/"
Expand Down

0 comments on commit e7d1241

Please sign in to comment.