TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: sus – static site based URL shortener

13 pointsby nkantarover 4 years ago

6 comments

gwernover 4 years ago
URL shortening is just one use case for generating redirects. I wrote a similar module for Hakyll (&#x27;Hakyll.Web.Redirect&#x27; <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;hakyll-4.13.4.0&#x2F;docs&#x2F;Hakyll-Web-Redirect.html" rel="nofollow">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;hakyll-4.13.4.0&#x2F;docs&#x2F;Hak...</a>) but my intent was to allow renaming pages without breaking links and fixing the (truly innumerable) number of user errors in linking&#x2F;writing URLs.<p>Because every original URL must be a valid file name, it does limit you compared to the full rewrite capabilities of Apache or Nginx, but that&#x27;s the price you pay for a fully-static site. (I thought vaguely about writing some JS you could put in a 404.html to snoop the intended URL and do a lookup in a table to redirect to, but never got around to figuring out the details.)
captn3m0over 4 years ago
I like the simpleness of the idea here, but don&#x27;t like HTML-redirects (v&#x2F;s 302s).. Wondering if you could just do this via Netlify redirects?<p>I&#x27;ve found using txtd.io as a URL-shortener a much simpler approach.<p>Or lightsaber, which does the exact same thing, but with Ruby (and allows some wildcards): <a href="https:&#x2F;&#x2F;github.com&#x2F;captn3m0&#x2F;lightsaber" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;captn3m0&#x2F;lightsaber</a>
评论 #24523251 未加载
blaisioover 4 years ago
I don&#x27;t think it&#x27;s a big deal, but I was confused for a minute, because sus in English slang is short for suspect&#x2F;suspicious.
评论 #24523286 未加载
stp-ipover 4 years ago
We went the direction of DNS based redirects using a set of TXT records to get portability and delegation of subpaths with txtdirect.org (FOSS based on Caddy) Currently working on a new iteration and feedback is always appreciated.
djydeover 4 years ago
Cool. I made one similar <a href="https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;genlink" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;djyde&#x2F;genlink</a>
llagerlofover 4 years ago
Your project looks like my last one: very useful, but nobody understood the purpose.
评论 #24523297 未加载