8 releases

0.1.7 Nov 9, 2024
0.1.6 Aug 7, 2023
0.1.5 Jun 19, 2023
0.1.4 Apr 13, 2023
0.1.3 Jan 11, 2023

#227 in Web programming

Download history 6/week @ 2024-09-23 94/week @ 2024-11-04 22/week @ 2024-11-11

116 downloads per month

MIT license

8KB
135 lines

Mubo, a static url shortener generator

Mubo allows you to host your own static url shortener on GitHub Pages (or Netlify, Vercel, GitLab Pages, ...) by populating a config.toml file.

Getting started

To add a new link, append the following values to your config.toml file:

[[links]]
key = "otso"
url = "https://otso.fr"

The key represents the slug that will be used to redirect to the url.

Build the static site

Run the mubo command within the root directory of your project where lies the config.toml file.

It will generate all the pages and subdirectories under the r directory.

Use the url shortener

If we take the example above, you will need to go to the YOUR_BASE_URL/r/otso to be redirected to https://otso.fr

Live example

To see a live example of this script, you can have a look at my own url shortener.

Did you know ?

mubo means 'short' in Cebunao

Dependencies

~1–2MB
~41K SLoC