Skip to content
/ duck Public

An HTML-based URL shortener for static sites. 🦆

License

Notifications You must be signed in to change notification settings

pid1/duck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

duck 🦆

GitHub Super-Linter

An HTML-based URL shortener for static sites. Demo Gif

Implementation and Usage

By updating duck.ini with the directory containing your GitHub Pages site (or any other static site), you can use this to quickly generate short URLs for web resources with no nonsense, no tracking, and no credit card required.

./quack.py <url> dumps out a small HTML file that contains a meta tag with a Refresh element and a target URL. This will redirect browsers to the provided target URL. The filename is the shorturl of the target resource.

Optionally, pass the --slug argument to use a custom slug. This bypasses the configured slug length in duck.ini so you can use whatever you would like.

Configuration

duck.ini contains all available configuration options.

sitedir should point to the GitHub Page static site directory you would like to control with duck.

sluglength determines the length of the shortcode generated by duck. This can be updated at any time, so feel free to start with a smaller value for convenience.

Demo

You can see this in action at the following URLs.

https://pid1.pw/duck redirects to https://github.com/pid1/duck

https://pid1.pw/GM redirects to https://youtube.com

https://pid1.pw/fb redirects to https://facebook.com

The GitHub Pages repository that powers the pid1.pw demo above is available here.

About

An HTML-based URL shortener for static sites. 🦆

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages