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 - title: Troubleshooting
key: troubleshooting key: troubleshooting
destination: troubleshooting destination: troubleshooting
- title: Support Matrix - title: Supported Providers
key: support-matrix key: supported-providers
destination: support-matrix destination: supported-providers
- title: ZenHub - title: ZenHub
key: zenhub key: zenhub
destination: zenhub destination: zenhub

View File

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