This guide leads you embed YouTube videos in Starlight/Astro.
-
Start by installing the lite-youtube-embed
↗ package using your favorite package manager:
-
Create YouTube.astro
in src/components
:
Now, you can import it into your project inside any .astro/mdx
file. For example:
The code above generates the following on the page: