Skip to content

feat(templates): add podcast transcript template - #400

Open
08abhinav wants to merge 1 commit into
codercops:devfrom
08abhinav:feat/podcast-transcript-template
Open

08abhinav wants to merge 1 commit into
codercops:devfrom
08abhinav:feat/podcast-transcript-template

Conversation

@08abhinav

Copy link
Copy Markdown
Contributor

Description

Adds the podcast-transcript template (Podcast category). It shows the show name, the episode title, and up to three transcript lines, each with a timestamp (JetBrains Mono), a speaker name in the accent color, and the spoken text.

  • A line with blank text is skipped with no gap, even if its time or speaker is filled. With all three blank, the transcript area is hidden.
  • A blank time or speaker hides only that part, and the spoken text keeps the same x position on every row (fixed-width columns).
  • A long title shrinks with autoFontSize() and then truncates. A long speaker name truncates inside its column. A long line wraps to at most two lines and then truncates.
  • Accent and muted colors adjust on light backgrounds, following top-episodes.ts.
  • Exported in src/templates/podcast/index.ts and registered at the end of the podcast block in src/templates/registry.ts.

Closes #399
Part of #5

How I Tested This

  • Ran npm run dev and rendered /api/og?template=podcast-transcript with the defaults.
  • Checked each edge case via the API and the form UI:
    • blank line 2 (row skipped, no gap)
    • blank line with filled time and speaker (still skipped)
    • all three lines blank (transcript area hidden)
    • blank time only, blank speaker only (text stays aligned)
    • very long title, speaker name, and line (shrink, truncate, two-line clamp)
    • light background (#ffffff) with a bright accent (names and timestamps readable)
  • Ran npm run check and npm run test

AI Assistance

Claude helped me with debugging the registry issue and a typo in the draft. I reviewed it, ran it locally, and tested all the cases above myself.

Type of Change

  • Bug fix
  • New template
  • New feature
  • Documentation
  • Tests
  • Refactoring
  • Performance improvement
  • Other (describe below)

Screenshots

  1. Default render
Screenshot 2026-11-07 at 12 20 17 PM
  1. Blank row skipped
Screenshot 2026-11-07 at 12 33 09 PM
  1. Long title, speaker, and line
Screenshot 2026-11-07 at 12 21 10 PM
  1. Light background
Screenshot 2026-11-07 at 12 21 20 PM

Checklist

  • This PR targets dev
  • I was assigned the linked issue
  • npm run check passes
  • npm run test passes
  • For a bug fix: the new test fails without my change
  • Tested locally with npm run dev
  • Screenshots included for visual changes
  • New templates follow the Template Guidelines

This branch has not been deployed

No deployments
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.

Add the Transcript podcast template (podcast-transcript)

1 participant