al-quran.reflectslight.io/rules/pages/TheSurahIndex.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

44 lines
1 KiB
Ruby

#!/usr/bin/env ruby
##
# Contains rules that are related to TheSurahIndex in one
# way or another.
compile "/html/surah/index/redirect.html.erb" do
filter(:erb)
write("/index.html")
end
compile "/js/surah/index/redirect.ts" do
filter(:webpack)
write("/js/surah/index/redirect.js")
end
compile "/surahs.json" do
write "/surahs.json"
end
locales.each do |locale|
compile "/html/TheSurahIndex.html.erb", rep: "/#{locale}/TheSurahIndex" do
filter :erb, locals: {locale:}
write "/#{locale}/index.html"
end
end
compile "/js/pages/TheSurahIndex.tsx" do
filter :webpack, depend_on: ["/js/components", "/js/lib/[!WebPackage]/", "/js/hooks"]
write "/js/pages/TheSurahIndex.js"
filter :gzip_text
write "/js/pages/TheSurahIndex.js.gz"
end
compile "/js/pages/TheSurahIndex/package.ts" do
filter :webpack, depend_on: "/js/lib/WebPackage"
write "/js/pages/TheSurahIndex/package.js"
end
compile "/css/pages/TheSurahIndex.scss" do
filter :sass, syntax: :scss, style: :compact
filter :rainpress
write("/css/pages/TheSurahIndex.css")
end