Skip to content

flxwu/shortlinker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortlinker

A Simple Node.js CLI Utility to create redirecting shortlinks on your own website.

Usage

Install using npm or yarn:

npm install -g shortlinker 
yarn global add shortlinker

Then run it:

shortlinker https://github.com/flxwu/shortlinker GH-Link

will create a GH-Link.html file in your current directory that redirects to https://github.com/flxwu/shortlinker.

CLI Options

Output Directory

Use -D to specify the directory in which the redirect-file will be put into:

shortlinker https://github.com/flxwu/shortlinker GH-Link -D code/flxwu.github.io/links/

Given the website root is flxwu.github.io, I can now access the shortlink via flxwu.github.io/links/GH-Link.html.

Version Control

Use -G to enable automatic version control commit and push:

shortlinker https://github.com/flxwu/shortlinker GH-Link -D code/flxwu.github.io/links/ -G

shortlinker now creates the same shortlink as above, but also commits the new file and pushes it to the remote repository.

About

Tiny 9KB CLI Tool to turn your website into a link shortening service for your own URLs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published