Merge branch 'main' into production

This commit is contained in:
0x1eef 2024-01-03 15:57:13 -03:00
commit aef5ad40ee
4 changed files with 19 additions and 13 deletions

View file

@ -7,7 +7,7 @@
locales.each do |locale| locales.each do |locale|
compile "/html/index.html.erb", rep: "/#{locale}/surah/index" do compile "/html/index.html.erb", rep: "/#{locale}/surah/index" do
context = Ryo.from(filename: "index.html.erb", locale:) context = Ryo.from(filename: "index.html.erb", locale:, locales:)
filter(:erb, locals: {context:}) filter(:erb, locals: {context:})
filter(:tidy) filter(:tidy)
write "/#{locale}/index.html" write "/#{locale}/index.html"

View file

@ -6,6 +6,19 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="description" content="<%= t(context.locale, 'meta.index.description') %>"> <meta name="description" content="<%= t(context.locale, 'meta.index.description') %>">
<link rel="icon" href="/favicon.svg"> <link rel="icon" href="/favicon.svg">
<link
rel="canonical"
hreflang="<%= context.locale %>"
href="https://al-quran.reflectslight.io/<%= context.locale %>/"
/>
<% context.locales.each do |locale| %>
<link
rel="alternate"
type="text/html"
hreflang="<%= locale %>"
href="https://al-quran.reflectslight.io/<%= locale %>/"
/>
<% end %>
<%= inline_css('/css/postman.scss') %> <%= inline_css('/css/postman.scss') %>
<%= opengraph(context) %> <%= opengraph(context) %>
</head> </head>

View file

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="description" content="<%= t(context.locale, 'meta.stream.description') %>"> <meta name="description" content="<%= t(context.locale, 'meta.stream.description') %>">
<link rel="icon" href="/favicon.svg">
<link <link
rel="canonical" rel="canonical"
hreflang="<%= context.locale %>" hreflang="<%= context.locale %>"

View file

@ -4,22 +4,14 @@
<% locales.each do |locale| %> <% locales.each do |locale| %>
<url> <url>
<loc>https://al-quran.reflectslight.io/<%= locale %>/</loc> <loc>https://al-quran.reflectslight.io/<%= locale %>/</loc>
<% locales.each do |locale| %> <priority>1.0</priority>
<xhtml:link <changefreq>weekly</changefreq>
rel="alternate"
hreflang="<%= locale %>"
href="https://al-quran.reflectslight.io/<%= locale %>/"/>
<% end %>
</url> </url>
<% Ryo.each(slugs) do |_id, slug| %> <% Ryo.each(slugs) do |_id, slug| %>
<url> <url>
<loc>https://al-quran.reflectslight.io/<%= locale %>/<%= slug %>/</loc> <loc>https://al-quran.reflectslight.io/<%= locale %>/<%= slug %>/</loc>
<% locales.each do |locale| %> <priority>0.7</priority>
<xhtml:link <changefreq>weekly</changefreq>
rel="alternate"
hreflang="<%= locale %>"
href="https://al-quran.reflectslight.io/<%= locale %>/<%= slug %>/"/>
<% end %>
</url> </url>
<% end %> <% end %>
<% end %> <% end %>