al-quran_kaios/nanoc/rules/redirect.rules

20 lines
502 B
Text
Raw Normal View History

2024-10-17 04:57:13 +02:00
#!/usr/bin/env ruby
# frozen_string_literal: true
##
# Contains rules for a redirect from the root path
# to the surah index for a given locale (eg / -> /en/)
compile "/html/main/redirect.html.erb" do
filter(:erb, locals: {context: Ryo(locale: "en"), locales:})
filter(:tidy, exe: tidy)
write("/index.html")
end
compile "/js/main/redirect.ts" do
filter :webpack,
argv: ["--config", "etc/webpack.#{buildenv}.js"],
depend_on: ["/js/lib/"]
write("/js/main/redirect.js")
end