You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide/22-videos.qmd
+36-16Lines changed: 36 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,14 @@ versions: ">=0.3"
8
8
9
9
# Videos
10
10
11
-
Videos can make tutorials, demos, and explainers far more effective than screenshots alone. Great Docs supports YouTube, Vimeo, and local video files with responsive layouts, lazy loading, and accessibility features built in.
11
+
Videos can make tutorials, demos, and explainers far more effective than screenshots alone. Great
12
+
Docs supports YouTube, Vimeo, and local video files with responsive layouts, lazy loading, and
13
+
accessibility features built in.
12
14
13
15
## YouTube
14
16
15
-
Use the following syntax to embed a YouTube video. You can use the regular watch URL, the short URL, or the embed URL (all three work):
17
+
Use the following syntax to embed a YouTube video. You can use the regular watch URL, the short URL,
18
+
or the embed URL (all three work):
16
19
17
20
```{shortcodes="false"}
18
21
{{< video https://www.youtube.com/watch?v=wo9vZccmqwc >}}
@@ -22,7 +25,8 @@ Use the following syntax to embed a YouTube video. You can use the regular watch
22
25
{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}
23
26
```
24
27
25
-
All three produce the same result. The video is responsive by default and it scales to fill the available width while maintaining a 16:9 aspect ratio.
28
+
All three produce the same result. The video is responsive by default and it scales to fill the
29
+
available width while maintaining a 16:9 aspect ratio.
26
30
27
31
Here's a live example:
28
32
@@ -31,7 +35,8 @@ Here's a live example:
31
35
::: {.callout-tip}
32
36
## YouTube Controls
33
37
34
-
YouTube embeds use the standard YouTube player, giving visitors full access to native controls including ad skipping, captions, playback speed, and quality settings.
38
+
YouTube embeds use the standard YouTube player, giving visitors full access to native controls
39
+
including ad skipping, captions, playback speed, and quality settings.
35
40
:::
36
41
37
42
### Start Time
@@ -61,17 +66,20 @@ Vimeo videos work the same way:
61
66
{{< video https://vimeo.com/548291297 >}}
62
67
```
63
68
64
-
Vimeo embeds are lazy-loaded automatically: the iframe content is deferred until the video scrolls near the viewport.
69
+
Vimeo embeds are lazy-loaded automatically: the iframe content is deferred until the video scrolls
70
+
near the viewport.
65
71
66
72
## Local Video Files
67
73
68
-
To embed a video file stored alongside your documentation (e.g., a short screen recording), place the file in your project and reference it directly:
74
+
To embed a video file stored alongside your documentation (e.g., a short screen recording), place
75
+
the file in your project and reference it directly:
69
76
70
77
```{shortcodes="false"}
71
78
{{< video demo.mp4 >}}
72
79
```
73
80
74
-
Local videos are rendered as HTML5 `<video>` elements. To host them alongside your `.qmd` files, place them in the `assets/` directory:
81
+
Local videos are rendered as HTML5 `<video>` elements. To host them alongside your `.qmd` files,
82
+
place them in the `assets/` directory:
75
83
76
84
```
77
85
user_guide/
@@ -87,7 +95,8 @@ Then reference from the `.qmd` file:
87
95
```
88
96
89
97
::: {.callout-note}
90
-
Keep video files small. Git repositories aren't ideal for large binary files. For longer recordings, consider uploading to YouTube or Vimeo and embedding from there.
98
+
Keep video files small. Git repositories aren't ideal for large binary files. For longer recordings,
99
+
consider uploading to YouTube or Vimeo and embedding from there.
91
100
:::
92
101
93
102
## Aspect Ratio
@@ -124,11 +133,13 @@ A short tour of the CERN facility.
124
133
See @fig-demo for the full walkthrough.
125
134
```
126
135
127
-
This assigns the video a figure number and caption, and `@fig-demo` creates a clickable cross-reference elsewhere on the page.
136
+
This assigns the video a figure number and caption, and `@fig-demo` creates a clickable
137
+
cross-reference elsewhere on the page.
128
138
129
139
## Loom
130
140
131
-
Loom videos aren't recognized by the video syntax directly. Instead, use the Loom embed URL in a raw HTML `<iframe>`:
141
+
Loom videos aren't recognized by the video syntax directly. Instead, use the Loom embed URL in a raw
142
+
HTML `<iframe>`:
132
143
133
144
```html
134
145
<divclass="quarto-video ratio ratio-16x9">
@@ -140,18 +151,27 @@ Loom videos aren't recognized by the video syntax directly. Instead, use the Loo
140
151
</div>
141
152
```
142
153
143
-
Replace `YOUR_VIDEO_ID` with the ID from your Loom share link (e.g., if the share link is `https://www.loom.com/share/abc123`, the ID is `abc123`). The `quarto-video ratio ratio-16x9` classes give it the same responsive container as other videos, and Great Docs will lazy-load the iframe automatically.
154
+
Replace `YOUR_VIDEO_ID` with the ID from your Loom share link (e.g., if the share link is
155
+
`https://www.loom.com/share/abc123`, the ID is `abc123`). The `quarto-video ratio ratio-16x9`
156
+
classes give it the same responsive container as other videos, and Great Docs will lazy-load the
157
+
iframe automatically.
144
158
145
159
## Tips
146
160
147
-
-**Ads**: YouTube may show ads on monetized videos, even in embeds. To guarantee an ad-free experience, upload to a channel you control with monetization disabled.
148
-
-**Privacy**: Consider using `youtube-nocookie.com` embed URLs (e.g., `https://www.youtube-nocookie.com/embed/VIDEO_ID`) to reduce tracking.
149
-
-**Multiple videos**: The thumbnail placeholder optimization means pages with many YouTube embeds still load quickly (only the thumbnails are fetched initially).
161
+
-**Ads**: YouTube may show ads on monetized videos, even in embeds. To guarantee an ad-free
162
+
experience, upload to a channel you control with monetization disabled.
163
+
-**Privacy**: Consider using `youtube-nocookie.com` embed URLs (e.g.,
164
+
`https://www.youtube-nocookie.com/embed/VIDEO_ID`) to reduce tracking.
165
+
-**Multiple videos**: The thumbnail placeholder optimization means pages with many YouTube embeds
166
+
still load quickly (only the thumbnails are fetched initially).
150
167
151
168
## Next Steps
152
169
153
-
Embedded videos bring tutorials, demos, and walkthroughs to life without leaving the documentation site. Great Docs lazy-loads all video embeds for fast page loads, regardless of how many videos appear on a page.
170
+
Embedded videos bring tutorials, demos, and walkthroughs to life without leaving the documentation
171
+
site. Great Docs lazy-loads all video embeds for fast page loads, regardless of how many videos
172
+
appear on a page.
154
173
155
174
-[Diagrams](diagrams.qmd) covers Mermaid diagrams for visualizing architecture and workflows
156
-
-[Authoring QMD Files](authoring-qmd-files.qmd) covers other rich content like callouts, tabsets, and code blocks
175
+
-[Authoring QMD Files](authoring-qmd-files.qmd) covers other rich content like callouts, tabsets,
176
+
and code blocks
157
177
-[Theming & Appearance](theming.qmd) explains how video containers adapt to your site's styling
0 commit comments