https://github.com/gustavwilliam/shortify2
A revamped version of the free GitHub Pages link shortener
https://github.com/gustavwilliam/shortify2
github-pages link-shortener template
Last synced: 2 months ago
JSON representation
A revamped version of the free GitHub Pages link shortener
- Host: GitHub
- URL: https://github.com/gustavwilliam/shortify2
- Owner: gustavwilliam
- Created: 2023-10-04T00:22:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T18:14:38.000Z (over 1 year ago)
- Last Synced: 2025-06-05T04:11:59.075Z (4 months ago)
- Topics: github-pages, link-shortener, template
- Language: Python
- Homepage: http://s.godi.se/
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](#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:
```bash
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.
```bash
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 mainGitHub 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.