seo-related changes

This commit is contained in:
0x1eef 2024-01-03 15:55:21 -03:00
parent 32940de80a
commit 2ea3055305
4 changed files with 19 additions and 14 deletions

View file

@ -7,7 +7,7 @@
locales.each do |locale|
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(:tidy)
write "/#{locale}/index.html"

View file

@ -6,6 +6,19 @@
<meta charset="UTF-8">
<meta name="description" content="<%= t(context.locale, 'meta.index.description') %>">
<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') %>
<%= opengraph(context) %>
</head>

View file

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<meta name="description" content="<%= t(context.locale, 'meta.stream.description') %>">
<link rel="icon" href="/favicon.svg">
<link
rel="canonical"
hreflang="<%= context.locale %>"
@ -19,7 +20,6 @@
href="https://al-quran.reflectslight.io/<%= locale %>/<%= context.surah.slug %>/"
/>
<% end %>
<link rel="icon" href="/favicon.svg">
<%= opengraph(context) %>
</head>
<body>

View file

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