Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Commit 53bdc87

Browse files
authored
adding discord redirect (#2827)
1 parent 738bfba commit 53bdc87

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

_config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ collections:
114114
challenges: { output: true }
115115
learning: { output: true }
116116
more: { output: true }
117+
redirects: { output: true }
117118

118119
# --- Defaults ---
119120

@@ -192,3 +193,8 @@ defaults:
192193
video_type: "Teachable Machine"
193194
video_type_short: "Tutorial"
194195
can_contribute: true
196+
197+
# Redirects
198+
- scope: { path: "", type: "redirect" }
199+
values:
200+
layout: "external-redirect"
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: base
3+
---
4+
5+
<div class="redirect">
6+
<p>Redirecting you to {{ page.title }}...</p>
7+
<a href="{{ page.redirect_to }}">Click here if you have redirects turned off.</a>
8+
<script>
9+
function redirect() {
10+
window.location.replace("{{ page.redirect_to }}");
11+
}
12+
setTimeout(redirect, 200);
13+
</script>
14+
</div>

_redirects/discord.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Coding Train Discord
3+
redirect_to: "https://discord.gg/hPuGy2g"
4+
redirect_from:
5+
- "/discord"
6+
---

0 commit comments

Comments
 (0)