Merge pull request #2271 from jonasrosland/fix-redirects

Fix shortlinks redirect
pull/2273/head
Nolan Brubaker 2020-02-13 12:26:25 -05:00 committed by GitHub
commit 61e1047bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 19 deletions

View File

@ -1,9 +1,9 @@
- title: Troubleshooting
key: troubleshooting
destination: troubleshooting
- title: Support Matrix
key: support-matrix
destination: support-matrix
- title: Supported Providers
key: supported-providers
destination: supported-providers
- title: ZenHub
key: zenhub
destination: zenhub

View File

@ -1,28 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% if page.dir != "/docs/" %}
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}" />
<script type="text/javascript">
window.location.href = "{{ page.redirect.to }}"
</script>
<title>Redirecting...</title>
</head>
<body>
Redirecting to {{ page.redirect.to }}. If it doesn't load, click <a href="{{ page.redirect.to }}" />here</a>.
</body>
</html>
{% endif %}
{% if page.dir == "/docs/" %}
{% if page.dir contains "/docs/" %}
<meta http-equiv="refresh" content="0; url=/docs/{{ site.latest }}/{{ page.destination }}" />
<script type="text/javascript">
window.location.href = "/docs/{{ site.latest }}/{{ page.destination }}"
</script>
<title>Redirecting...</title>
<title>Redirecting to docs...</title>
</head>
<body>
Redirecting to {{ page.destination }}. If it doesn't load, click <a href="/docs/{{ site.latest }}/{{ page.destination }}" />here</a>.
</body>
</html>
{% endif %}
{% endif %}