Add redirect mechanism

This commit is contained in:
n 2021-06-16 21:04:45 +09:00
parent bf46e692f8
commit 79463b300e
2 changed files with 22 additions and 0 deletions

View 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
View 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
---