al-quran.reflectslight.io/nanoc/rules/random.rules
0x1eef 48eda16678 Move /src/js/pages/* to /src/js/
And move `/src/css/pages/*` to `/src/css/`.
2023-10-29 20:24:26 -03:00

20 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
context = Ryo.from({locale:})
filter(:erb, locals: {context:})
filter(:tidy)
write("/#{locale}/random/index.html")
end
end
compile "/js/pages/Random.ts" do
filter(:webpack)
write("/js/random.js")
end