Introducing Hkrn.ws
Hkrn.ws is a URL shortener for hacker news.
Hkrn.ws is a URL shortener for hacker news.
Basically, it turns hkrn.ws/12303075 into https://news.ycombinator.com/item?id=12303075.
I built this for a simpler time, when twitter charged you by the character for URLs. Today, I think the main value is having beautiful URLs. There is a ton of accidental complexity in the current Hacker News URL structure, and it hurts my eyes to look at it. I hope you’ll find it useful.
For a super simple site, it has — I think — a super interesting tech stack.
How it works
It turnshttps://hkrn.ws/12303075
into
https://news.ycombinator.com/item?id=12303075https://hkrn.ws/u/pbiggar
into
https://news.ycombinator.com/user?id=pbiggarhttps://hkrn.ws/newest
into
https://news.ycombinator.com/newesthttps://hkrn.ws
into
https://news.ycombinator.com/
Or more specifically, it 302 redirects URLs with these patterns:hkrn.ws/(\d+)
-> news.ycombinator.com/item?id=$1hkrn.ws/u/(.*)
-> news.ycombinator.com/user?id=$1hkrn.ws/.*
-> news.ycombinator.com/$1
Done
A simple project with a cool “making-of”. I hope you’ll find it useful.
Comments ()