Add redirect mechanism
This commit is contained in:
parent
bf46e692f8
commit
79463b300e
10
content/_includes/redirect.njk
Normal file
10
content/_includes/redirect.njk
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0; url='{{ redirect.to }}'" />
|
||||
</head>
|
||||
<body>
|
||||
Redirecting to <a href="{{ redirect.to }}">{{ redirect.to }}</a>
|
||||
</body>
|
||||
</html>
|
12
content/redirects.md
Normal file
12
content/redirects.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
# This file allows redirecting URLs to prevent link rot.
|
||||
pagination:
|
||||
data: redirects
|
||||
size: 1
|
||||
alias: redirect
|
||||
redirects:
|
||||
- {"from": "/git/clone-commit-via-ssh/", "to": "/git/clone-commit-via-cli/"}
|
||||
- {"from": "/git/clone-commit-via-http/", "to": "/git/clone-commit-via-cli/"}
|
||||
permalink: "{{ redirect.from }}"
|
||||
layout: redirect
|
||||
---
|
Loading…
Reference in a new issue