Skip to content

Explicitly support video #1660

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

Merged
merged 1 commit into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,24 @@ Which looks like:

image::resources/readme/example.svg[An example svg]

[[videos]]
== Videos

You can add a vimeo hosted video with Asciidoctor's
https://asciidoctor.org/docs/user-manual/#video[video] tag:

[source,asciidoc]
----
video::366852847[vimeo,height=480]
----

NOTE: You *should* set height or else the video will be tiny. You *shouldn't*
set width because Vimeo will preserve the aspect ratio for you.

Which renders like this:

video::366852847[vimeo,height=480]

[[tables]]
== Tables

Expand Down
11 changes: 11 additions & 0 deletions resources/web/style/video.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#guide {
/* This should line up with img.pcss. */
.videoblock {
img {
max-width: 100%;
}
iframe {
width: 100%
}
}
}
1 change: 1 addition & 0 deletions resources/web/styles.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@import './style/this_page.pcss';
@import './style/toc.pcss';
@import './style/util.pcss';
@import './style/video.pcss';
@import './style/xpack.pcss';

/* test comment used to detect unminified source */