tiny-redirects is a minimal Git-based redirect management system that lets you configure short URLs using YAML files. All redirect entries are compiled into a static _redirects file, ideal for deployment on Netlify/Cloudflare. In this case Netlify is preferred because Decap CMS integrated seemlessly with Netlify.
- All .yaml files inside the redirects/ folder are processed.
- The build.py script reads, validates, and converts them into a single _redirects file.
- This _redirects file can be served directly by Netlify to handle static redirects.
- If deployed on Netlify, urls can be added via Decap CMS
Each file should contain redirect entries like:
Or, if editing via CMS:
Note: build.py supports both formats.
This generates a _redirects file at the project root.
Once _redirects is present, Netlify will automatically handle the redirects during deployment. In Netlify, set build command as python3 build.py
- admin/config.yml is preconfigured for use with Decap CMS (formerly Netlify CMS).
- It uses GitHub as a backend, and authentication is handled by Netlify Identity.
- Visit /admin on your deployed site to use the admin panel.
config.yml sample:
The file blog-redirects.yml inside the redirects/ folder is auto-generated from an external repository for personal use. Reference: https://github.com/rishikeshsreehari/personal-blog/blob/main/scripts/short_url.py