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 GitHub, then finally doing the actual redirect, by a substantially inferior JavaScript technique. Also, it doesn’t work on IE because the polyfills were insufficient. Yes, this is an interesting technical demonstration of a concept, but it a…
Thank you for the reply! I definitely learnt a lot from your comprehensive replies. Personally, I am just getting started in web development and I have traditionally written everything with the help of frameworks like ReactJS and the like and the abstractions these frameworks provide means I actually don't know the nitty gritty of how things work. Cross browser compatibility or efficiency was definitely not something…
Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
171–180 of 182 posts
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#172Earlier quoted context omitted.
"I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free." I felt exactly the same way and did, in fact, build one.[1] It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no…
What does the "searchable" option mean? I couldn't find anything about it in the faqs.
Then google can just find that index page and index every link on it - and all codes marked searchable will be indexed by google.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#173Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#174Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#175Then I got a little offended by myself. Information Theory has stated clearly that universal compression is impossible, and how come that I didn't recall that?
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#176Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#177I like mine better :P https://github.com/wesleytodd/short
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#178Earlier quoted context omitted.
That’s clever! I once did the same, except I used a static site generator that I would push to Github and deploy on Netlify.
I’d love to know more about how you did this!
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#179This 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 shortened URL lookups as an element in the HTML source itself. You would have a submit input on the page. User enters the url they'd like to shorten (or is pulled from a param). The JS reads that value and then looks it up to see if it alrea…
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, that is a sweet idea, and there are other replies that suggested using a static site generator to generate one html file per short link, with each html file containing a "redirect" tag in . This idea can definitely be combined with a GitHub a…
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#180If you're using github pages you should just structure jekyll such that you can edit data/_links.yml instead of having thousands of users wasting compute power for github api when its not necessary