A revamped version of the free GitHub Pages link shortener Shortify.
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.
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
Run build.py
while inside the virtual environment.
python build.py
Deploying is easy, following the steps below:
- Add/update the routes in
routes.yml
with the formatname: url
for new links - Add and commit the file to Git
- 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.