Giter Site home page Giter Site logo

teees2 / go.param.me Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paramt/go.param.me

0.0 0.0 0.0 79 KB

Private URL shortener for my personal links

Home Page: https://go.param.me/source

License: MIT License

JavaScript 20.19% Python 51.05% HTML 28.77%

go.param.me's Introduction

go.param.me Netlify Status

A URL shortener for my personal links.

Redirects

All the redirect URLs are maintained in redirects.csv, which is fetched by the client script.js each time someone visits the site. There is no dynamic content as everything is done by the client-side. Alternatively, and if Netlify is set up, then a _redirects file can be used to create server-side redirects which improve SEO and are faster.

Note: server-side redirects only support http and https protocols. mailto links will fallback on redirects.csv

Usage

Redirects can be added or removed by opening a new issue on GitHub. Creating a new issue runs update_redirects.py, which modifies redirects.csv and _redirects.

Add URL

In order to add a redirect, the issue must be created by the user specified in config.js, be titled "Add URL", and have the update redirects label. The issue body needs to follow this syntax:

Short URL --> Long URL

Remove URL

In order to remove a redirect, the issue must be created by the user specified in config.js, be titled "Remove URL", and have the update redirects label. The issue body should contain the short URL to remove.

Modify

If you'd like to create your own URL shortener, fork this repo, modify config.js, the meta redirect in index.html, and the domain name in CNAME. Remember to delete the existing redirects too!

config.js

Option Description Type Example
shortDomain The short domain that will redirect to other URLs str "go.param.me"
defaultRedirect The default redirect in case a link that does not exist is requested str "https://www.param.me"
repo The GitHub repo where redirects.csv is located str "paramt/go.param.me"
users The list of GitHub users that are allowed to modify the list of redirects by opening an issue str[] ["paramt"]
netlify_redirects Whether or not the script should generate a _redirects file (used by Netlify's server-side redirects) bool true
utm Whether or not a UTM code should be appended to the URL when redirecting. Note: this does not work if server-side redirects are being used bool false

License

The repo is licensed under the MIT License, so you may use and modify the code in any way as long as the copyright and license notices are kept.

go.param.me's People

Contributors

paramt avatar actions-user avatar anandchowdhary avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.