Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dthung1602/r
A static URL shortener runs on Github Page
https://github.com/dthung1602/r
Last synced: 5 days ago
JSON representation
A static URL shortener runs on Github Page
- Host: GitHub
- URL: https://github.com/dthung1602/r
- Owner: dthung1602
- License: mit
- Created: 2023-09-04T10:48:14.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-04T16:22:19.000Z (about 1 year ago)
- Last Synced: 2023-09-05T05:39:46.847Z (about 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
## What is this?
A static URL shortener runs on Github Page.
## How does it work?
1. Clone this repo
2. Config URLS in `config.json`. Syntax below
3. Run `python main.py`, the relevant HTML files will be generated
4. Add those files, commit, push & deploy to [Github Page](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site)
5. User access a HTML file, get redirected to the desired URL using ``**Config file structure**
```json
{
"urls": {
"path1": "https://example.com",
"path2": "https://example.com/path2",
"parent-path": {
"child1": "https://example.com/1",
"child2": "https://example.com/2"
}
}
}
```This will result in the following mappings:
```
https://.github.io//path1 --> https://example.com
https://.github.io//path2 --> https://example.com/path2
https://.github.io//parent-path/child1 --> https://example.com/1
https://.github.io//parent-path/child2 --> https://example.com/2```
## License
Distributed under the MIT License.
## Contributing
Any contributions you make are greatly appreciated.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request[contributors-shield]: https://img.shields.io/github/contributors/dthung1602/r.svg?style=flat-square
[contributors-url]: https://github.com/dthung1602/r/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/dthung1602/r.svg?style=flat-square
[forks-url]: https://github.com/dthung1602/r/network/members
[stars-shield]: https://img.shields.io/github/stars/dthung1602/r.svg?style=flat-square
[stars-url]: https://github.com/dthung1602/r/stargazers
[issues-shield]: https://img.shields.io/github/issues/dthung1602/r.svg?style=flat-square
[issues-url]: https://github.com/dthung1602/r/issues
[license-shield]: https://img.shields.io/github/license/dthung1602/r.svg?style=flat-square
[license-url]: https://github.com/dthung1602/r/blob/master/LICENSE