HexHub: Takes you to a Hex package's GitHub page, if available

Got bored today and worked on a little site that does what the title says.

You can go to hexhub.us to go to the main page but it’s better used like this: hexhub.us/phoenix.

Silly and small little project!

1 Like

Heh, I like that. You could PR it into hex.pm so if someone goes to, say, https://hex.pm/packages/phoenix/<somelink> such as https://hex.pm/packages/phoenix/github then it automatically redirects to the url of the named link, so for github it would find the link with the name github and redirect appropriately. Now if only there were consistent naming on the ‘source’ link (not everyone uses github). ^.^

Yep, I have to do links.github || links.GitHub || links.Github and there’s probably more than I’m missing, and that’s not counting Gitlab and Bitbucket.

You could lowercase the keys then lookup in that resultant list based on, say “github”, “bitbucket”, “git”, “source”, etc… in order, find the first match. :slight_smile: