
Redirect.pudu
Pudu25 lines837 B
1/** @Docgen.Site.Redirect — pages that send readers to a moved article */2module PuduLangDocgen.Site.Redirect34import PuduLangDocgen.Paths as Paths567export fn page(title: Str, destination: Str) -> Str {8 let href = Paths.escape(destination)9 [10 "<!doctype html>",11 "<html lang=\"en\">",12 "<head>",13 "<meta charset=\"utf-8\">",14 "<title>" + Paths.escape(title) + "</title>",15 "<meta name=\"robots\" content=\"noindex\">",16 "<meta http-equiv=\"refresh\" content=\"0; url=" + href + "\">",17 "<link rel=\"canonical\" href=\"" + href + "\">",18 "</head>",19 "<body>",20 "<p class=\"redirect\">This page has moved to <a href=\"" + href + "\">" + href + "</a>.</p>",21 "</body>",22 "</html>"23 ].join("\n") + "\n"24}25