al-quran.reflectslight.io/rules/pages/RandomRedirect.rules
0x1eef c892d88e65 Redirect to the surah index from the root path
When a browser visits the root path (/) then redirect to
the surah index with the appropriate locale (eg /en/, /ar/).
2023-03-08 00:27:01 -03:00

22 lines
508 B
Ruby

#!/usr/bin/env ruby
##
# Contains rules that are related to RandomRedirect.html.erb
# in one way or another
compile "/html/redirect-to-surah-slug.html.erb" do
filter(:erb)
1.upto(114) do |surahno|
locales.each { write(File.join("/", _1, surahno.to_s, "index.html")) }
end
end
compile "/js/pages/RandomRedirect.ts" do
filter :webpack
write "/js/pages/RandomRedirect.js"
end
compile "/js/pages/redirect-to-surah-slug.ts" do
filter :webpack
write "/js/pages/redirect-to-surah-slug.js"
end