Skip to content

A revamped version of the free GitHub Pages link shortener

Notifications You must be signed in to change notification settings

gustavwilliam/shortify2

Repository files navigation

Shortify 2

A revamped version of the free GitHub Pages link shortener Shortify.

Adding links

Add a link to the shortener by adding it to routes.yml, committing and pushing to main. This will trigger a GitHub workflow to build and deploy the new link automatically.

See Deploy for more details.

Dev setup

Clone the repo and cd into the directory. Then follow the steps below to set up a virtual environment and install the dependencies:

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

Important

For local development, you have to include .html after the link. For example the link to /python would be /python.html

Dev commands

Build

Run build.py while inside the virtual environment.

python build.py

Deploy

Deploying is easy, following the steps below:

  1. Add/update the routes in routes.yml with the format name: url for new links
  2. Add and commit the file to Git
  3. Push to main

GitHub Actions will take care of the rest, and deploy the new shortened links.

Note

You can add/edit/delete links quickly by updating the routes.yml file in the GitHub UI. Committing to main will redeploy with your changes.

About

A revamped version of the free GitHub Pages link shortener

Topics

Resources

Stars

Watchers

Forks