Add title and body to alias page (#830)

This commit is contained in:
Laurent Arnoud 2019-10-28 18:14:11 +00:00 committed by Vincent Prouillet
parent d624f7ec8b
commit aaaed31f9c
2 changed files with 14 additions and 0 deletions

View file

@ -470,6 +470,16 @@ fn can_build_site_with_pagination_for_index() {
"page/1/index.html",
"http-equiv=\"refresh\" content=\"0;url=https://replace-this-with-your-url.com/\""
));
assert!(file_contains!(
public,
"page/1/index.html",
"<title>Redirect</title>"
));
assert!(file_contains!(
public,
"page/1/index.html",
"<a href=\"https://replace-this-with-your-url.com/\">Click here</a>"
));
assert!(file_contains!(public, "index.html", "Num pages: 1"));
assert!(file_contains!(public, "index.html", "Current index: 1"));
assert!(file_contains!(public, "index.html", "First: https://replace-this-with-your-url.com/"));

View file

@ -1,8 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirect</title>
<link rel="canonical" href="{{ url | safe }}" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ url | safe }}" />
</head>
<body>
<p><a href="{{ url | safe }}">Click here</a> to be redirected.</p>
</body>
</html>