Bored of github default opengraph ? Replace it !
Introduction · Features · How to use · Themes · Deployment · FAQ
Important
Since the GitHub API only allows 5k requests per hour per user account, the public instance hosted on https://togp.xyz could possibly hit the rate limited and result in a ratelimit error response. To avoid this, prioritze using caching on github or deploying your own instance
Important
This is a small project, and the host is not free. To support me, consider starring this repo!
Terminal ogp is providing an alternative to github opengraphs images that i find kinda boring. It uses images that are terminal-like to get a more "tecchie" look that i find cool !
Terminal-ogp is a DPIP.lol project.
- Themes
- No caching issues
- No 500 errors
- Always return an svg
- Convert svgs to pngs
- Orgs support
- Server-side caching
- Github workflow to auto-update the social preview (note that this isn't possible at this time)
To use a terminal opengraph in your readme, take this following code and paste it into your readme:
This will show the image in your readme, make sure to replace YOUR_USERNAME and YOUR_REPO by the actual values. Setting avatar to true will add your avatar in the bottom right corner.
Note => If you need your image to be updated each time you reload the readme, set the parameter
cacheto false (add&cache=falsein the URL)
Note
There are several themes of this API, BUT WE NEED MORE ! If you got an idea, please check the tutorial to provide us your very own theme !
Use ?theme=THEME_NAME parameter like so:
To host your very own version of this project, follow those easy steps:
- Clone this repository
Open a terminal and use git to clone this repository
git clone https://github.com/douxxtech/terminal-ogp- Host the files
Go on your PHP webserver server (make sure that php is allowed in the php.ini) and put the files of /src/ into your file server.
- Configure the php file
Open the /src/index.php and replace YOUR_GITHUB_TOKEN with a personal access token with repo permissions.
Click here to create a personal token
Q: Can we contribute to this project ?
A: Sure! To do so, fork this repository, make your changes and do a pull request !
Q: Are you storing users datas ?
A: No. We aren't collecting or storing anything
Q: How to support you ?
A: I don't want any money. But you can star this repo or follow me !
The API may can return an error page if something went wrong or is missing.
The error message will most of the time tell where the error occured, so just follow the instructions to fix it. However, if the error message doesn't help you, consider opening an issue
Made by douxxtech | douxx.tech | dpip.lol