diff --git a/rules/pages/surah/id_redirect.rules b/rules/pages/surah/id_redirect.rules index 6d768f27a..e314803ff 100644 --- a/rules/pages/surah/id_redirect.rules +++ b/rules/pages/surah/id_redirect.rules @@ -1,5 +1,9 @@ #!/usr/bin/env ruby +## +# Rules for a redirect from a surah id to +# a surah name (eg /en/1/ -> /en/al-fatihah/) + 1.upto(114) do |id| locales.each do |locale| compile "/html/pages/surah/id_redirect.html.erb", rep: "redirect_id/#{id}" do diff --git a/rules/pages/surah/index.rules b/rules/pages/surah/index.rules index 276362605..11a2b2781 100644 --- a/rules/pages/surah/index.rules +++ b/rules/pages/surah/index.rules @@ -1,8 +1,8 @@ #!/usr/bin/env ruby ## -# The surah index (available at /en, /ar, etc) and -# its dependencies. +# Rules for the surah index available at //, +# (eg /en/) and its dependencies. locales.each do |locale| compile "/html/pages/surah/index.html.erb", rep: "/#{locale}/surah/index" do diff --git a/rules/pages/surah/random.rules b/rules/pages/surah/random.rules index 5e2055f42..0f1ad9282 100644 --- a/rules/pages/surah/random.rules +++ b/rules/pages/surah/random.rules @@ -1,7 +1,8 @@ #!/usr/bin/env ruby ## -# Redirects to a random surah +# Rules for a redirect from //random/ to a +# random surah (eg /en/random/ -> /en/al-kahf/) locales.each do |locale| compile "/html/pages/surah/random.html.erb", rep: "random/#{locale}" do diff --git a/rules/pages/surah/redirect.rules b/rules/pages/surah/redirect.rules index 4ab0d2de1..2e33ebf39 100644 --- a/rules/pages/surah/redirect.rules +++ b/rules/pages/surah/redirect.rules @@ -1,8 +1,8 @@ #!/usr/bin/env ruby ## -# Redirect from the root path to the surah index -# for a given locale (eg '/ -> /en', '/ -> /ar', etc) +# Rules for a redirect from the root path to the surah +# index for a given locale (eg / -> /en/) compile "/html/pages/surah/redirect.html.erb" do filter(:erb) diff --git a/rules/pages/surah/stream.rules b/rules/pages/surah/stream.rules index 45ecd296c..ed99bba14 100644 --- a/rules/pages/surah/stream.rules +++ b/rules/pages/surah/stream.rules @@ -1,8 +1,8 @@ #!/usr/bin/env ruby ## -# Contains rules that are related to TheSurahPage.html.erb in one -# way or another +# Rules for the surah stream available at /// +# (eg /ar/al-fatihah/) and its dependencies. compile "/*/*/surah.json" do write(item.identifier.to_s)