Skip to content

feat(docs): add template preview generation script - #159

Merged
jrusso1020 merged 1 commit into
mainfrom
03-31-feat_docs_add_template_preview_generation_script
Mar 31, 2026
Merged

feat(docs): add template preview generation script#159
jrusso1020 merged 1 commit into
mainfrom
03-31-feat_docs_add_template_preview_generation_script

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

What

Add a script that uses @hyperframes/producer to render PNG thumbnails of each built-in template. Output goes to docs/images/templates/.

Why

User feedback: "I would have loved more visual examples of what's actually possible. I had to scaffold every template just to see what they look like." This is the foundation for a visual template gallery in the docs.

How

  • New scripts/generate-template-previews.ts uses the producer's createFileServer + createCaptureSession + captureFrame APIs — hyperframes renders its own templates
  • Patches out __VIDEO_SRC__ placeholders (same logic as init.ts) so templates render without a video file
  • Captures a frame at t=2s for each template (skips blank — it's just empty scaffolding)
  • Handles varying dimensions (vignelli is 1080x1920 portrait)
  • Adds pnpm generate:previews npm script

Test plan

  • pnpm generate:previews generates 8 PNGs in docs/images/templates/
  • Each PNG is visually correct (verified by viewing)
  • --only <template> flag works for single template generation

@mintlify

mintlify Bot commented Mar 31, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hyperframes 🟢 Ready View Preview Mar 31, 2026, 5:47 PM

jrusso1020 commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator Author

@jrusso1020
jrusso1020 merged commit 05aceed into main Mar 31, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants