Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate playwright social image generation to the NodeJS worker #3

Open
3 tasks
fennifith opened this issue Jan 25, 2025 · 0 comments
Open
3 tasks

Comments

@fennifith
Copy link
Member

The Astro site currently contains a social-images buildscript that uses Playwright to render image previews for each blog post.

We want to move these to this repo as a separate task in the NodeJS worker/ so that they can be cached between builds.

  • Create a task implementation for "social-image" in worker/, which accepts the post parameters
    • (dependent on layout - there are two different types of social images that should be independent of each other)
    • This should store the resulting image in S3
  • Add a database table to store the generated social image filename and a hash of the input data.
  • Add an endpoint to the REST api/ to queue a social image job or return its result. This should fetch the post data and check that it matches the hash in the database if there is a preexisting image. If it is missing or doesn't match the hash, a new social-image task should be queued.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant