Skip to content

ewalk153/byos-screen-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

byos-screen-renderer

Simple app to render a TRMNL screen

Local dev

go run main.go

Build and run docker

docker build -t byos-screen-renderer-ruby .
docker run -v "$(pwd)/tmp:/output" -p 8080:8080 --rm byos-screen-renderer-ruby

Usage

curl -X POST http://localhost:8080/render/myslug \
  -H "Content-Type: application/json" \
  -d '	{
		"template": "<body>hi</body>",
		"title": "App running",
		"date": "Jul 26, 2025",
		"column_1_title": "Nested Liquid Example with Array 1",
		"column_2_title": "Nested Liquid Example with Array 2",
		"column_1": {
			"Name":  "Eric",
			"email": "[email protected]"
		},
		"column_2": {
			"Size":  "5",
			"Type": "cool"
		}
	}'

Note, the template field is optional. By default, template.liquid is used.

To fetch the results:

curl http://localhost:8080/screenshot.png/myslug -o output.png

Next feature ideas

  • passing key on render that must be passed to retrieve the image (query param handle)
  • split out liquid layout from body template, allow template per handle
  • cache rendered files, leverage docker dir mapping to support application reboots

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published