Skip to content

Terminal OpenGraph Preview is a free and opensource alternative to original github opengraph image. You can get different themes and informations on your brand new opengraph image with this API !

License

Notifications You must be signed in to change notification settings

douxxtech/terminal-ogp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bored of github default opengraph ? Replace it !

Introduction · Features · How to use · Themes · Deployment · FAQ


Important Notices

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!

Introduction

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.

Features

  • 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)

How to use

1. In a ReadMe

To use a terminal opengraph in your readme, take this following code and paste it into your readme:

![Terminal GitOpenGraphImage](https://togp.xyz/?owner=YOUR_USERNAME&repo=YOUR_REPO&avatar=false)

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 cache to false (add &cache=false in the URL)

Themes

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:

![togp](https://togp.xyz/?owner=douxxtech&repo=terminal-ogp&theme=json-dark-all)

Check all the themes here !

Deployment

To host your very own version of this project, follow those easy steps:

  1. Clone this repository

Open a terminal and use git to clone this repository

git clone https://github.com/douxxtech/terminal-ogp
  1. 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.

  1. 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

FAQ

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 !


Specific content

err

Errors returned by the API

The API may can return an error page if something went wrong or is missing.

Error image

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

Readme Views


Made by douxxtech | douxx.tech | dpip.lol

About

Terminal OpenGraph Preview is a free and opensource alternative to original github opengraph image. You can get different themes and informations on your brand new opengraph image with this API !

Topics

Resources

License

Stars

Watchers

Forks

Languages