duplicate nav items names get same url

Clicking on Comments in the GitHub API Main Nav menu will add the active class to both Gists/Comments and Issues/Comments.


This whole conditional is repeated 3 times in different ways.

Let's extract it to a method: `getSlugFromResource`.