Skip to content

Commit c129297

Browse files
committed
Redirect /docs to the right page
I've hit this a few times where I want to get to docs so I take whatever my urlbar gives me and strip out the actual page so I can get to the root, however that's a 404. This introduces a super easy way to redirect, which could be handy in the future as docs get rewritten. I would much rather do this with a real htaccess file or even just handle 404s gracefully, but that's not currently an option with GitHub pages (since we generate our own and don't use a custom domain).
1 parent 30a11d2 commit c129297

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/_layouts/redirect.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="refresh" content="0; {{ page.destination }}">
4+
</head>
5+
<body></body>
6+
</html>

docs/docs/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: redirect
3+
destination: getting-started.html
4+
---

0 commit comments

Comments
 (0)