Skip to content

wargatiga2021/shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— URL Shortener for Warga Tiga

This is Warga Tiga's URL shortener based on nelsontky's Github Page shortener.

πŸ‘¨β€πŸ« Demo & How To

  1. For example, url.wargati.ga/1 should link to this repo.

  2. To add a new short link:

  • Make sure you have a Github account, if you don't then register. It's easy.
  • Go to https://github.com/farellfaiz/wargatiga-url-shortener/issues.
  • Add an issue by clicking the New Issue button.
  • Fill the issue form with the title being the link you want to shorten (including the http(s)://).
  • Shorten your link by clicking the Submit New Issue button.
  1. The newly created short url can be accessed via url.wargati.ga/{issue_number} Issue number.

β˜•οΈ Features

  1. Unlike many URL shorteners, this one does not need a database uses a "database" in the form of GitHub issues and can be entirely hosted on GitHub pages.

  2. There is no need for the pound symbol - short URLs look clean like this: url.wargati.ga/1 instead of looking like this: url.wargati.ga/#1.

πŸ’‘ How does this work?

Thanks to @kidGodzilla for the pretty neat explanation here.

  1. 404.html handles all requests
  2. Small javascript snippet fetches a JSON representation of the GitHub issue via the JSON API, and redirects to the issue title, as a URL.
  3. Profit?

πŸ‘¨β€πŸ’» Credit

About

URL shortener for wargati.ga.

Resources

Stars

Watchers

Forks

Contributors

Languages