Home

Awesome

Welcome to social-image-kodyfire 👋

Version Documentation License: MIT Twitter: anis_marrouchi

Generate a dynamic image for social media sharing based on HTML templates using Kodyfire. This is just the beginning.

🏠 Homepage

Requirements

social-image-kodyfire requires the kodyfire-cli to be installed

npm install -g kodyfire-cli

Install

npm install social-image-kodyfire

Usage

Method 1: As a generator

In order to generate your artifacts, run the generate command. The syntax is kody generate|g [kody] [concept]. If you ommit kody and concept the assistant will prompt you to select them. As an example, run the following command from your terminal:

kody generate react component

Method 2: As a kody project

Refer to the kodyfire generate your artifact section. Once your project is initialized and ready for kody, run the following command to generate your images.

kody run -s kody-social-image.json

Available Templates

basic (credits: puppeteer-social-image)

Renders text on a background image.

<img style="margin-bottom: 16px;" src="assets/basic.png" width=400 />
Params

article (credits: puppeteer-social-image)

Display a title and subtitle on a background image, with an optional eyebrow

<img style="margin-bottom: 16px;" src="assets/article.png" width=400 />
Params

fiftyfifty (credits: puppeteer-social-image)

Tempate with split content

<img style="margin-bottom: 16px;" src="assets/fiftyfifty.png" width=400 />
Params

doodle (credits: css-doodle)

Tempate using the doodle-css as background

<table> <tr> <td>fakeBox</td> <td>neon</td> <td>seeding</td> <td>strings</td> </tr> <tr> <td><img src="assets/doodle-fakeBox.png" width=200></td> <td><img src="assets/doodle-neon.png" width=200></td> <td><img src="assets/doodle-seeding.png" width=200></td> <td><img src="assets/doodle-strings.png" width=200></td> </tr> </table> <table> <tr> <td>timeTravel</td> <td>tubes</td> <td>unicode</td> </tr> <tr> <td><img src="assets/doodle-timeTravel.png" width=200></td> <td><img src="assets/doodle-tubes.png" width=200></td> <td><img src="assets/doodle-unicode.png" width=200></td> </tr> </table>
Params

Add the following params to your generated concepts. As an example, the final updated concepts might look like the following:

{
      "name": "image-3",
      "template": "fiftyfifty.html.template",
      "split": "diagonal",
      "fontWeight": "medium",
      "fontSize": "80px",
      "title": "Hello World!",
      "subtitle": "Your subtitle",
      "eyebrow": "17 July 2022",
      "logo": "https://noqta.tn/_next/image?url=%2Fimages%2Flogo.svg&w=256&q=75",
      "background": "tranparent",
      "imageUrl": "https://images.unsplash.com/photo-1507608869274-d3177c8bb4c7?w=1950&q=80",
      "color": "#000",
      "includeWatermark": true,
      "watermark": "social-image-kodyfire",
      "size": "facebook",
      "outputDir": ""
    }

📅 Future Features

Run tests

TODO

Author

👤 Anis Marrouchi

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

Credits

📝 License

Copyright © 2022 Anis Marrouchi.

This project is MIT licensed.


This README was generated with ❤️ by readme-kodyfire