Add YouTube video embeds and mermaid diagrams to the article. Replaces placeholders with actual embed code.
Process and embed media in the article.
Load Article
articles/[slug]/article.jsonarticles/[slug]/output/article.mdarticles/[slug]/research/sources.jsonFind Media Placeholders
<!-- YOUTUBE: ... --> comments[EMBED: ...] markers from outlineFrom YouTube URLs like:
https://youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDExtract the video ID.
Replace placeholders with responsive embed:
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe
src="https://www.youtube.com/embed/VIDEO_ID"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>
*[Video Title](https://youtube.com/watch?v=VIDEO_ID)*
If sections lack video content:
site:youtube.com [section topic] tutorial 2024If [DIAGRAM: ...] markers exist, generate mermaid:
```mermaid
flowchart LR
A[Input] --> B[Process]
B --> C[Output]
## Output
### 1. Update article.md
- Replace all YouTube placeholders with embeds
- Add mermaid diagrams where marked
- Ensure consistent formatting
### 2. Update article.json
```json
{
"youtube_embeds": [
{
"video_id": "...",
"title": "...",
"section": "section-id",
"url": "..."
}
]
}
[timestamp] Media embedded
- YouTube videos: N
- Diagrams added: N
Summarize:
/review