All Projects → nelsontky → Gh Pages Url Shortener

nelsontky / Gh Pages Url Shortener

Licence: gpl-3.0
Minimal URL shortener that can be entirely hosted on GitHub pages.

Projects that are alternatives of or similar to Gh Pages Url Shortener

urlzap
⚡️ Your own static URL shortener
Stars: ✭ 57 (-93.83%)
Mutual labels:  github-page, self-hosted, url-shortener
Fx
A Function as a Service tool makes a function as a container-based service in seconds.
Stars: ✭ 1,679 (+81.71%)
Mutual labels:  self-hosted, serverless
Azurlshortener
An simple and easy Url Shortener
Stars: ✭ 247 (-73.27%)
Mutual labels:  url-shortener, serverless
osmosfeed
Turn GitHub into an RSS reader
Stars: ✭ 839 (-9.2%)
Mutual labels:  github-page, self-hosted
Sheets Url Shortener
A simple short URL redirect service built on top of Google Sheets, and runs for cheap on Google Cloud Run serverless.
Stars: ✭ 89 (-90.37%)
Mutual labels:  url-shortener, serverless
delta
A modern file uploader + URL shortner written in node for your private cloud. low memory overhead + secure
Stars: ✭ 103 (-88.85%)
Mutual labels:  self-hosted, url-shortener
Appwrite
Appwrite is a secure end-to-end backend server for Web, Mobile, and Flutter developers that is packaged as a set of Docker containers for easy deployment 🚀
Stars: ✭ 14,592 (+1479.22%)
Mutual labels:  serverless, self-hosted
Terraform Aws Github Runner
Terraform module for scalable GitHub action runners on AWS
Stars: ✭ 326 (-64.72%)
Mutual labels:  self-hosted, serverless
Personal Site
My personal website - built with React, React-Router, React-Snap for Static-Export, and GitHub Pages.
Stars: ✭ 324 (-64.94%)
Mutual labels:  serverless, github-page
Bon
🍮 A small, simple/minimal self hosted URL shortener written in Go (Golang).
Stars: ✭ 12 (-98.7%)
Mutual labels:  self-hosted, url-shortener
Para
Open source back-end server for web, mobile and IoT. The backend for busy developers. (self-hosted or hosted)
Stars: ✭ 389 (-57.9%)
Mutual labels:  self-hosted, serverless
Urlhum
The modern, privacy-aware URL Shortener built in PHP.
Stars: ✭ 513 (-44.48%)
Mutual labels:  self-hosted, url-shortener
Miniflux Legacy
Minimalist RSS reader (version 1.x)
Stars: ✭ 897 (-2.92%)
Mutual labels:  self-hosted
Github Elpa
Build and Publish Your Own ELPA Repositories with GitHub Pages
Stars: ✭ 19 (-97.94%)
Mutual labels:  github-page
Edinote
Note taking web application for self-hosting. Offers tagging & Markdown support; can be used as a simple alternative to Evernote.
Stars: ✭ 17 (-98.16%)
Mutual labels:  self-hosted
Xuanxuan
xuanxuan is an open source IM resolution.
Stars: ✭ 893 (-3.35%)
Mutual labels:  self-hosted
Up Node8
The way this project is packaging the Node 8 app isn't the best. Try the official example of Apex Up that uses the Node binary!
Stars: ✭ 22 (-97.62%)
Mutual labels:  serverless
Flox
Self Hosted Movie, Series and Anime Watch List
Stars: ✭ 901 (-2.49%)
Mutual labels:  self-hosted
Yunohost
YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.
Stars: ✭ 832 (-9.96%)
Mutual labels:  self-hosted
Funcraft
(have) Fun with Serverless(API Gateway & Function Compute)
Stars: ✭ 833 (-9.85%)
Mutual labels:  serverless

License: GPL v3 Total Lines GitHub stars

🔗 GitHub Pages URL Shortener

This is a minimal URL shortener that can be entirely hosted on GitHub pages. It does not need the maintenance of any servers or databases and can be hosted entirely on GitHub for free!

Yay! We got to the top of HN!

Top of HN

And on GitHub trending!

GitHub Trending

👨‍🏫 Demo

  1. nlsn.cf/1 should link to this repo.

  2. To add a new short link, add an issue with the title being the link you want to shorten (including the http(s)://) to https://github.com/nelsontky/gh-pages-url-shortener-db/issues.

  3. The newly created short url can be accessed via nlsn.cf/{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: nlsn.cf/1 instead of looking like this: nlsn.cf/#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?

😎 This is so cool! How can I use this with my own domain?!

Disclaimer: This method of creating a URL shortener is hacky and not meant to be reliable. Do proceed at your own risk!

  1. Fork the repo before cloning your fork.
  2. Set up GitHub pages for your forked repo.
    1. In your forked repo, click the Settings tab and scroll down to the GitHub Pages section.
    2. Then select the main branch source and click on the Save button.
    3. How to create GitHub page
  3. If you are using your own domain:
    1. Set your domain up for GitHub pages.
    2. Change the URL in CNAME file to your domain.
  4. If you are using GitHub page's default domain i.e. Something like https://<username>.github.io/<repo-name>/
    1. Delete the CNAME file.
    2. Change var PATH_SEGMENTS_TO_SKIP = 0; at the top of 404.html to var PATH_SEGMENTS_TO_SKIP = 1;.
      1. This is as GitHub domains have an additional path segment (the repo name) after the host name.
  5. Create a new repo as a database. (Or you could use your forked repo)
    1. Update var GITHUB_ISSUES_LINK = "<your-github-issues-link>"; at the top of 404.html accordingly afterwards.
      1. Format for GITHUB_ISSUES_LINK: https://api.github.com/repos/{owner}/{repo}/issues/
      2. Remember the trailing /!
  6. Push your changes to your forked repo, and your low cost and cool as heck URL shortener will be ready for use!

🍴 Featured forks

To feature your fork here, edit this section and open a PR!

  • eexit.github.io/s - Created a bash script that allows for shortening of URLs straight on the command line! Check out his script here.
  • gh-short-url - A npm command line tool that use github pages to convert short url.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].