Skip to content

Commit fb84c84

Browse files
author
Steve Krouse
committed
## Shortcut to github issues
* TOC {: toc } Now [futureofcoding.org/issues](./issues) will link to https://github.com/stevekrouse/futureofcoding.org/issues And [futureofcoding.org/issues/3](./issues/3) will link to #3 This works for arbitrary issues because I wrote the code in the 404 page for this repo, which here acts as a router.
1 parent 4f29cd2 commit fb84c84

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

404.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ title: 404
66

77
Congrats, you've discovered my 404 page!
88

9+
<script>
10+
11+
// futureofcoding.org/issues -> https://github.com/stevekrouse/futureofcoding.org/issues
12+
// futureofcoding.org/issues/3 -> https://github.com/stevekrouse/futureofcoding.org/issues/3
13+
const path = window.location.pathname
14+
.split("/")
15+
.slice(1) // get rid of the leading ""
16+
if (path.length > 0) {
17+
if (path[0] == "issues") {
18+
window.location.replace("https://github.com/stevekrouse/futureofcoding.org/" + path.join("/"))
19+
}
20+
}
21+
22+
</script>
23+
24+
925
<script>
1026

1127
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

0 commit comments

Comments
 (0)