-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding videos: Youtube #492
Comments
Isn't there already an easy way?
I don't think there needs to be a special syntax when Youtube makes it easy to get exactly what you need. |
You can also use wrapper For example: <div class="video-wrapper">
<iframe width="1280" height="720" src="https://www.youtube.com/embed/vZNyjuNLhIk" frameborder="0" allowfullscreen></iframe>
</div> For .video-wrapper {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
padding-bottom: 56.25%;
}
.video-wrapper > iframe {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
} |
And you can add your wrapper JS with the mkdocs feature |
As embedding YouTube videos should be possible in plain HTML, and the Material theme doesn't provide Markdown parsers (for syntactic sugar syntax), I'm closing this issue. For further directions on embedding, please see the previous posts. |
…e for one-liner imports Also add needed styles for video wrapper, especially YouTube embeds from squidfunk/mkdocs-material#492 (comment). Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
Would be super cool if there was a standard way for adding youtube videos in the spec and by that in the official docker image ;)
The text was updated successfully, but these errors were encountered: