feat(posts): embed per-episode Slidev decks#72
Conversation
Render an interactive Slidev deck on an episode page when the episode opts in via a new `hasSlides` flag (or an explicit `slidesUrl`). The deck URL is derived from the episode slug and a configurable `SLIDES_BASE_URL`, pointing at the separate video-slides project hosted on GitHub Pages. - content.config.ts: add optional `hasSlides` and `slidesUrl` - constants.ts: add `SLIDES_BASE_URL` - SlidesEmbed.astro: responsive aspect-video iframe + open-in-new-tab link - posts/[...slug].astro: conditional embed after the video block - ep68.mdx: opt in with `hasSlides: true` Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Code Review — feat(posts): embed per-episode Slidev decksOverall: This is a clean, well-scoped feature. The component design mirrors SecurityMissing <a
href={src}
target="_blank"
referrerpolicy="no-referrer" <!-- privacy handled, but opener is not -->
...
>Without rel="noopener noreferrer"Bug / Logic
const slug = post.id.replace(/^\/?posts\//, "");
const slidesSrc =
frontData.slidesUrl ?? `${SLIDES_BASE_URL}/${slug}/`;Two minor issues here:
Minor observations
What's good
Summary: One security fix is needed (add |
What
Embed an interactive Slidev deck on an episode page when the episode opts in via a new
hasSlidesflag (or an explicitslidesUrloverride). The deck URL is derived from the episode slug + a configurableSLIDES_BASE_URL, pointing at the companion AsyncTalk/video-slides project (hosted on GitHub Pages).Changes
content.config.ts— optionalhasSlides+slidesUrlconstants.ts—SLIDES_BASE_URLSlidesEmbed.astro— responsiveaspect-videoiframe + open-in-new-tab link (mirrorsVideoEmbed.astro)posts/[...slug].astro— conditional embed after the video blockep68.mdx— opts in withhasSlides: trueTest plan
astro build→ 75 pages built/posts/ep68embeds…/video-slides/ep68/;/posts/ep67(no flag) has no iframeNote
The embed is blank until the companion video-slides repo is deployed to GitHub Pages. Decks are authored/built there (see its PR). Remove
hasSlides: trueon ep68 if you want to hold the embed back until then.🤖 Generated with Claude Code