Skip to content

forkkit/social-cards

 
 

Repository files navigation

Serverless Social Cards Seed Status

A serverless app created with SST that dynamically generates social share or Open Graph (OG) images.

Getting Started

Read the guide on how this service is configured and how you can create your own — Dynamically generate social share images with serverless.

You can also reference the example on using the Chromium Lambda Layer.

Running Locally

Start by installing the dependencies.

$ npm install

Install the @sparticuz/chromium layer.

$ cd layers/chromium && npm install

Then start the Live Lambda Development environment.

$ npx sst start

The templates to generate the share images are stored in templates/. And all the non-Latin fonts are placed in .fonts/.

Deploying to Prod

Deploy your service to prod by running.

$ npx sst deploy --stage prod

To clear the cache of generated images, invoke the clear-cache.handler with the following payload.

{"path":"<template-name>/"}

Documentation

Learn more about the SST.

Releases

No releases published

Packages

No packages published

Languages

  • HTML 36.2%
  • CSS 26.0%
  • JavaScript 21.6%
  • TypeScript 16.2%