Skip to content

Commit 392f530

Browse files
thekavemanExperimentsInHonesty
authored andcommitted
Implement redirects for gh-pages (#107)
* layout for redirecting via meta refresh using page.redirect_to front matter variable * implement current redirects using new layout to implement a new redirect, create a .md file in root with a front-matter declaration like: --- layout: redirect permalink: /<shortcut here>/ redirect: <redirect url here> ---
1 parent 72bbe75 commit 392f530

File tree

7 files changed

+53
-0
lines changed

7 files changed

+53
-0
lines changed

_layouts/redirect.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<link rel="canonical" href="{{ page.redirect_to }}"/>
5+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
6+
<meta http-equiv="refresh" content="0;url={{ page.redirect_to }}" />
7+
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}" />
8+
</head>
9+
<body>
10+
{%- include header.html -%}
11+
<main role="main">
12+
<section class="content-section redirect">
13+
<div class="page-contain" style="margin-top: 2em">
14+
<h2>Redirecting...</h2>
15+
<p>This page has moved to <a href="{{ page.redirect_to }}">{{ page.redirect_to }}</a></p>
16+
<p>Please click the link above if you are not automatically redirected after a few seconds.</p>
17+
</div>
18+
</section>
19+
</main>
20+
{%- include footer.html -%}
21+
<script>location='{{ page.redirect_to }}'</script>
22+
</body>
23+
</html>

calendar.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /calendar/
4+
redirect_to: https://calendar.google.com/calendar?cid=cnQ3dXBpcmF2ZWtpOTFhY2trdXQ5OTRwZHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ
5+
---

conduct.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /conduct/
4+
redirect_to: https://github.com/hackforla/codeofconduct
5+
---

donate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /donate/
4+
redirect_to: https://donorbox.org/hackforla
5+
---

github.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /github/
4+
redirect_to: https://www.github.com/hackforla
5+
---

meetup.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /meetup/
4+
redirect_to: https://www.meetup.com/hackforla
5+
---

slack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: redirect
3+
permalink: /slack/
4+
redirect_to: https://hackforla-slack.herokuapp.com/
5+
---

0 commit comments

Comments
 (0)