Skip to content

Commit 6f36d1b

Browse files
committed
docs: update readme with sample
1 parent 11d0117 commit 6f36d1b

File tree

3 files changed

+77
-64
lines changed

3 files changed

+77
-64
lines changed

CODE_OF_CONDUCT.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# OG:IMAGE REST Generator Code of Conduct
2+
3+
OG:IMAGE REST Generator is committed to providing a safe, inclusive, and harassment-free environment for everyone who contributes to the project, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, or religion.
4+
5+
As a member of this community, you agree to abide by the following Code of Conduct:
6+
7+
- Respect and be kind to all community members, regardless of their background or beliefs.
8+
- Do not engage in any form of harassment, discrimination, or intimidation, including but not limited to: offensive comments, verbal or written abuse, sexual harassment, or physical violence.
9+
- Do not engage in any behavior that may be deemed as threatening or harmful, either physically or mentally, to any community member.
10+
- Refrain from engaging in any inappropriate behavior, such as using profanity or engaging in disruptive behavior during community events or discussions.
11+
- Report any incidents of harassment, discrimination, or inappropriate behavior to the project maintainers immediately.
12+
13+
Failure to adhere to this Code of Conduct may result in disciplinary action, up to and including removal from the project and its associated platforms.
14+
15+
By contributing to OG:IMAGE REST Generator, you agree to abide by this Code of Conduct and help to create a safe and welcoming environment for all community members.

CONTRIBUTING.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing Guidelines
2+
Thank you for your interest in contributing to OG:IMAGE REST Generator! We welcome contributions from all members of the community.
3+
4+
## Getting Started
5+
To get started, simply fork the repository and make any changes or additions you'd like. Please ensure that your changes are related to the project's goal of simplifying the process of generating Open Graph images. #Ref: [DESIGN_GUIDELINE.md](DESIGN_GUIDELINE.md)
6+
7+
## Submitting Changes
8+
Once you've made your changes, please submit a pull request. Be sure to include a detailed description of your changes and any relevant information about the issue or feature you're addressing.
9+
10+
## Code of Conduct
11+
We follow the Contributor Covenant Code of Conduct in all our interactions. Please review the code of conduct before contributing: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
12+
13+
## License
14+
By contributing to OG:IMAGE REST Generator, you agree that your contributions will be licensed under the project's [GPLv3 License](LICENSE).
15+
16+
Thank you for your contributions to OG:IMAGE REST Generator!

README.md

+46-64
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h1 align="center">OG:IMAGE REST Generator</h1>
55

66
<p align="center">
7-
<strong>OG:IMAGE REST Generator</strong> is a free and powerful tool that simplifies the process of generating Open Graph images for your website or application. With our RESTful API, you can quickly and easily create customized images that will make your content stand out on social media platforms like Facebook, Twitter, and LinkedIn.
7+
<strong>OG:IMAGE REST Generator</strong> is a free and powerful tool that simplifies the process of generating Open Graph images for your website or application. With our RESTful API, you can quickly and easily create customized images that will make your content stand out on social media platforms like Facebook, Twitter, Instagram, Pinterest and LinkedIn.
88
</p>
99

1010
<p align="center">
@@ -16,82 +16,64 @@
1616
https://og-image-rest-generator.fly.dev
1717
```
1818

19-
## API Reference
20-
21-
#### Generate Simple Image (with gradient background)
22-
19+
## Usage
2320
```http
24-
POST /generate
25-
Content-Type: application/json
21+
GET /seo-banner
2622
```
2723

28-
| Parameter | Type | Description |
29-
| :-------- | :------- | :------------------------- |
30-
| `canonicalName` | `string` | this is the name we'll use to save our image (slugify first: Recomended!) |
31-
| `gradientColors` | `array` | an array of two colors, i.e. `[ '#ffffff', '#000000' ]`, used for our gradient |
32-
| `articleName` | `string` | the title of the article or site you want to appear in the image |
33-
| `articleCategory` | `string` | the category which that article sits in - or the subtext of the article |
34-
| `emoji` | `string` | the emoji you want to appear in the image. |
35-
36-
**Example**
37-
```curl
38-
curl -X POST \
39-
'https://<base-url>/generator' \
40-
--header 'Accept: */*' \
41-
--header 'Content-Type: application/json' \
42-
--data-raw '{
43-
"canonicalName": "metaphor-website-live",
44-
"articleName": "Metaphor Website Live",
45-
"gradientColors": ["#fc00ff","#00dbde"],
46-
"articleCategory": "open-sorce",
47-
"emoji": "🎉"
48-
}'
49-
```
24+
| Query | Type | Description |
25+
| :-------- | :------- | :-------------------------------- |
26+
| `head` | `string` | the head title legend |
27+
| `title` | `string` | the title of the article or site you want to appear in the image |
28+
| `writer` | `string` | the author legend |
29+
| `author` | `string` | the name of author |
30+
| `logo` | `string` | the logo of your app / web |
31+
| `template` | `string` | Choose one: `default`, `facebook`, `facebook-minimal`, `twitter`, `twitter-minimal`, `instagram`, `instagram-minimal`, `linkedin`, `linkedin-minimal`, `pinterest` |
5032

51-
**Result**:
33+
## Sample Images
5234

53-
```json
54-
{
55-
"message": "Image generated!",
56-
"image": "data:image/png;base64,y12msd..."
57-
}
58-
```
35+
### Default template (1342x853)
36+
![Template Default](images/sample-ogDefault.png)
5937

60-
**Sample Image**:
61-
![Legacy Generator](images/create-banner-image-from-grithub-action.png)
38+
### Facebook template (Recommended size: 1200 x 630 pixels)
39+
![Template Facebook](images/sample-ogFacebook.png)
6240

63-
#### Classic SEO Banner
41+
### Facebook Minimal template (Minimum size: 600 x 315 pixels)
42+
![Template Facebook Minimal](images/sample-ogFacebookMinimal.png)
6443

65-
```http
66-
GET /classic-seo-banner
67-
```
44+
### Twitter template (Recommended size: 1200 x 675 pixels)
45+
![Template Twitter](images/sample-ogTwitter.png)
6846

69-
| Query | Type | Description |
70-
| :-------- | :------- | :-------------------------------- |
71-
| `articleName` | `string` | the title of the article or site you want to appear in the image |
72-
| `author` | `string` | the name of author |
73-
| `language` | `string` | the category of programming language |
47+
### Twitter Minimal template (Minimum size: 600 x 335 pixels)
48+
![Template Twitter Minimal](images/sample-ogTwitterMinimal.png)
7449

75-
Result: `image/png`
50+
### Linkedin template (Recommended size: 1200 x 675 pixels)
51+
![Template Linkedin](images/sample-ogLinkedin.png)
7652

77-
**Sampe Image**:
78-
![Legacy Generator](images/classic-seo-banner.png)
53+
### Linkedin Minimal template (Minimum size: 600 x 400 pixels)
54+
![Template Linkedin Minimal](images/sample-ogLinkedinMinimal.png)
7955

80-
#### SEO Banner (New)
56+
### Instagram template (Recommended size: 1080 x 1080 pixels)
57+
![Template Instagram](images/sample-ogInstagram.png)
8158

82-
```http
83-
GET /seo-banner
84-
```
59+
### Instagram Minimal template (Minimum size: 600 x 600 pixels)
60+
![Template Instagram Minimal](images/sample-ogInstagramMinimal.png)
8561

86-
| Query | Type | Description |
87-
| :-------- | :------- | :-------------------------------- |
88-
| `title` | `string` | the title of the article or site you want to appear in the image |
89-
| `author` | `string` | the name of author |
90-
| `logo` | `string` | the logo of your app / web |
91-
| `head` | `string` | title legend |
92-
| `writer` | `string` | author legend |
62+
### Pinterest template (Recommended size: 1000 x 1500 pixels)
63+
![Template Pinterest](images/sample-ogPinterest.png)
64+
65+
## Help Wanted
66+
- [ ] Improve font scaling and title truncation
67+
- [ ] Improve layouts
68+
- [ ] Adding more fonts (Currently using `Inter Extrabold` and `Inter Medium`)
69+
70+
Welcoming everyone that have passion and skill to make this app powerfull and free.
71+
72+
## Contribute
73+
74+
OG:IMAGE REST Generator is an open-source project, and we welcome contributions from developers and enthusiasts of all levels of experience.
9375

94-
Result: `image/png`
76+
[CONTRIBUTING.md]
9577

96-
**Sample Image**:
97-
![Legacy Generator](images/seo-banner.png)
78+
## Donation / Support
79+
If you find OG:IMAGE REST Generator to be a helpful tool for your website or application, please consider supporting the project. Your donation or sponsorship can help ensure that the project continues to thrive and improve over time. You can sponsor the project directly through Github Sponsor or donate through Paypal. Your support is greatly appreciated and will help to ensure that this powerful tool remains available for free to users all over the world. Thank you for your generosity and support!

0 commit comments

Comments
 (0)