Permalink
Browse files

## 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.
  • Loading branch information...
stevekrouse committed Jan 5, 2018
1 parent 9d3a66d commit 39939036d0b55acf4ebd98ef9166ef9702dc5cb3
Showing with 16 additions and 0 deletions.
  1. +16 −0 404.md
View
16 404.md
@@ -6,6 +6,22 @@ title: 404
Congrats, you've discovered my 404 page!
<script>
// futureofcoding.org/issues -> https://github.com/stevekrouse/futureofcoding.org/issues
// futureofcoding.org/issues/3 -> https://github.com/stevekrouse/futureofcoding.org/issues/3
const path = window.location.pathname
.split("/")
.slice(1) // get rid of the leading ""
if (path.length > 0) {
if (path[0] == "issues") {
window.location.replace("https://github.com/stevekrouse/futureofcoding.org/" + path.join("/"))
}
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

0 comments on commit 3993903

Please sign in to comment.