Skip to content

Commit

Permalink
Merge pull request #48 from randovania/redirect
Browse files Browse the repository at this point in the history
add redirects from the old video db urls
  • Loading branch information
duncathan authored Mar 11, 2024
2 parents 92e156b + 18fc317 commit 9113a86
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ permalink: /guides/:title
collections:
games:
output: true
redirects:
output: true
permalink: /:path


### Analytics ###
Expand All @@ -52,6 +55,11 @@ defaults:
type: "games"
values:
layout: "game"
- scope:
path: ""
type: "redirects"
values:
layout: "redirect"
- scope:
path: ""
type: "posts"
Expand Down
15 changes: 15 additions & 0 deletions _layouts/redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: null
---
{% capture new-url %}{{ site.url }}{{ page.new-path }}{% endcapture %}
<html>
<head>
<title>{{ site.title }}</title>
<meta http-equiv="Refresh" content="0; url='{{ new-url }}'" />
</head>
<body>
<p>This page has been moved to
<a href="{{ new-url }}">{{ new-url }}.</a>
</p>
</body>
</html>
3 changes: 3 additions & 0 deletions _redirects/Another Metroid 2 Remake/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/am2r/videos
---
3 changes: 3 additions & 0 deletions _redirects/Cave Story/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/cave_story/videos
---
3 changes: 3 additions & 0 deletions _redirects/Metroid Dread/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/dread/videos
---
3 changes: 3 additions & 0 deletions _redirects/Metroid Prime 2 Echoes/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/prime2/videos
---
3 changes: 3 additions & 0 deletions _redirects/Metroid Prime 3 Corruption/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/prime3/videos
---
3 changes: 3 additions & 0 deletions _redirects/Metroid Prime/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/prime1/videos
---
3 changes: 3 additions & 0 deletions _redirects/Metroid Samus Returns/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/samus_returns/videos
---
3 changes: 3 additions & 0 deletions _redirects/Super Metroid/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
new-path: /games/super_metroid/videos
---

0 comments on commit 9113a86

Please sign in to comment.