Skip to content

Commit

Permalink
## Shortcut to github issues
Browse files Browse the repository at this point in the history
* 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
Steve Krouse committed Jan 5, 2018
1 parent 4f29cd2 commit fb84c84
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 404.md
Expand Up @@ -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(){
Expand Down

0 comments on commit fb84c84

Please sign in to comment.