Skip to content

Commit c5649d8

Browse files
committed
Updated with additional links
1 parent fe9cebb commit c5649d8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

_layouts/redirection.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
# © 2021 John Scott
66
# MIT License
77
---
8-
<html>
8+
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}">
99
<head>
10-
<meta http-equiv="refresh" content="0; url={{ page.redirect | relative_url }}">
10+
{%- if page.redirect contains "://" %}
11+
<meta http-equiv="refresh" content="0;url={{ page.redirect }}">
12+
<link rel="canonical" href="{{ page.redirect }}">
13+
<script>location="{{ page.redirect }}"</script>
14+
{%- else -%}
15+
<meta http-equiv="refresh" content="0;url={{ page.redirect | relative_url }}">
16+
<link rel="canonical" href="{{ page.redirect | absolute_url }}">
17+
<script>location="{{ page.redirect | relative_url }}"</script>
18+
{% endif %}
19+
<meta name="robots" content="noindex">
1120
</head>
1221
</html>

0 commit comments

Comments
 (0)