al-quran.reflectslight.io/rules/pages/RandomRedirect.rules
0x1eef 29bc167fa0 Split 'Rules' file across multiple files
This change will hopefuly make it easier  to scale the Rules file
over time. Rather than having one file with all rules, there are
multiple files that are categorized.

Ref #2
2023-03-01 22:04:50 -03:00

28 lines
639 B
Ruby

#!/usr/bin/env ruby
##
# Contains rules that are related to RandomRedirect.html.erb
# in one way or another
compile "/html/RandomRedirect.html.erb" do
filter(:erb)
write("/index.html")
locales.each { write "/#{_1}/index.html" }
end
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