gh-pages-url-shortener

Dev tools

url shortener

SHOW HN2020

Legend

gh-pages-url-shortener

A URL shortener that can be entirely hosted on GitHub Pages

github.com

#url shortener#github pages#serverless#github issues

355points
176comments
#105of 3,028 in 2020
Top 4%of 2020 by points

How HN took it

MixedNo clear lean

16 positive, 37 neutral or asking, 3 mixed, 23 critical, out of 79 comments about the project. Thread score -0.11.

Idea: 12 for, 8 againstExecution: 0 for, 12 againstDesign: 1 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clever hack that lets anyone add short links without a pull request.

    From 2 comments
    • Such a fun little hack. The killer feature is that you found a way for anyone to create a new short URL without a pull request or any changes to the original repository. Nice work.
      futhey on HN
    • Congrats! I really love this concept for two reasons. First I'm always fascinated by smart solutions that make use of existing free (as in beer) infrastructures to provide a…
      ghego1 on HN
  • Interesting learning exercise.

    From 1 comment
    • There's a lot of useful stuff to learn from this tiny example, providing you look at it more as a learning exercise than a production enterprise solution! OP, how does this get…
      oneeyedpigeon on HN

Objections

  • Relying on GitHub issues as a database is abuse and could get it shut down.

    From 3 comments
    • Interesting. This could be considered as abuse of github issues though.
      steerablesafe on HN
    • Using GH issues as DB :P I wonder how long before GitHub will notice and shut it down for abuse.
      maxpert on HN
    • It's so cool. I am using https://git.io as url shortener, and now this project makes me reconsider. What if some of shortener domain so popular that Github takes some action?…
      quyleanh on HN
  • Client-side redirects are worse than HTTP redirects and the bundle is large.

    From 1 comment
    • This currently uses about 100KB of JavaScript (over 99KiB of polyfills, about 3KiB of actual code), loading the HTML file, then three JavaScript files, then making an API call to…
      chrismorgan on HN
  • Too many URL shorteners already, which accelerates link rot.

    From 1 comment
    • We have too many URL shorteners already. These things accelerate link rot.
      bigbubba on HN
  • Malicious links are a risk.

    From 1 comment
    • Better be ready for the malicious links. I'm the developer of https://t.ly/ link shortener. I spend most of my time adding in protection to prevent people from using the service…
      TimLeland on HN

Requests

  • Store links in a file via a GitHub Action instead of issues.

    From 2 comments
    • This is really cool. I think it might even be possible to improve it further so opening an issue isn't even needed. My thinking is you could store the links and the corresponding…
      xendop on HN
    • I would find it better if he'd add something like an auto accept pull request bot, that allows you to append a single url (with validation check + rate limiting) to a file, that…
      tutfbhuf on HN
  • Use a service worker to issue real HTTP redirects.

    From 1 comment
    • This currently uses about 100KB of JavaScript (over 99KiB of polyfills, about 3KiB of actual code), loading the HTML file, then three JavaScript files, then making an API call to…
      chrismorgan on HN

Questions

  • How does it get around CORS?

    From 1 comment
    • There's a lot of useful stuff to learn from this tiny example, providing you look at it more as a learning exercise than a production enterprise solution! OP, how does this get…
      oneeyedpigeon on HN

Alternatives named

  • YOURLS

    From 1 comment
    • I setup YOURLS* for a client several years back, worked quite well. Was always a little concerned about privacy/potential for abuse (being self-hosted) but we never had those…
      josefresco on HN
  • Firebase URLs or Cloud Firestore

    From 1 comment
    • Hmm having a GitHub action redeploy the site is not instantaneous and it does take up to 1 minute for the site (and consequently the new short link) to be updated. Nevertheless,…
      nelsontky on HN
  • URLZap

    From 1 comment
    • That is quite interesting. Only issue is to rely on Github Issues for it (it might get messy with too many issues opened). I had this same ~dream of hosting a URL Shortener…
      brunoluiz on HN
  • git.io

    From 1 comment
    • It's so cool. I am using https://git.io as url shortener, and now this project makes me reconsider. What if some of shortener domain so popular that Github takes some action?…
      quyleanh on HN
  • Amazon S3 redirect objects

    From 1 comment
    • I made a URL shortener for the organization I work at using Amazon S3. I created a bucket that is hosted as a website, to which I upload empty files with the "Redirect" metadata…
      elondaits on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/25110879)