19 lines
464 B
Ruby
19 lines
464 B
Ruby
#!/usr/bin/env ruby
|
|
# frozen_string_literal: true
|
|
|
|
##
|
|
# Rules for a redirect from /<locale>/random/ to a random surah
|
|
# (eg /en/random/ -> /en/al-kahf/)
|
|
|
|
locales.each do |locale|
|
|
compile "/html/random.html.erb", rep: "random/#{locale}" do
|
|
title = i18n[locale].TheNobleQuran
|
|
filter(:erb, locals: {locale:, title:})
|
|
write("/#{locale}/random/index.html")
|
|
end
|
|
end
|
|
|
|
compile "/js/pages/Random.ts" do
|
|
filter(:webpack)
|
|
write("/js/pages/random.js")
|
|
end
|