#22 Embed YouTube Videos
Paste a YouTube link in a special tag — it renders as a playable video right inside your note.
Syntax
Wrap a YouTube URL with {% youtube ... %}:
{% youtube https://www.youtube.com/watch?v=dQw4w9WgXcQ %}
That's it. The video appears as a responsive, embedded player.
Supported URL formats
| Format | Example |
|---|---|
| Standard | https://www.youtube.com/watch?v=VIDEO_ID |
| Short link | https://youtu.be/VIDEO_ID |
| Shorts | https://www.youtube.com/shorts/VIDEO_ID |
All three formats work — PenPage extracts the video ID automatically.
Privacy
Embedded videos use youtube-nocookie.com — YouTube's enhanced privacy mode. No tracking cookies are set until the viewer actually plays the video.
Tips
- The embed is responsive — it resizes with the page width
- Videos are playable in both the editor and shared/public pages
- If the video doesn't appear, double-check the URL format