Collection Video
A collection video page displays a video player at the top of the page with additional content below it. Collection videos are related to each other and are grouped in a collection.
Create a collection video page
Section titled “Create a collection video page”To transform a documentation page into a collection video page, add the video frontmatter field to a Markdown or MDX page with the type set to collection-video and at least a link to the video, its duration and the collection it belongs to.
---title: A video from my coursevideo: type: collection-video link: https://www.youtube.com/watch?v=5u0Ds7wzUeI duration: 180 collection: course---
## A video from my course
Welcome to a video from my course!Frontmatter fields
Section titled “Frontmatter fields”The video frontmatter field supports the following fields when the type is set to collection-video:
required
type: string
The link to the video to display in the video player at the top of the page.
---video: link: https://www.youtube.com/watch?v=5u0Ds7wzUeI---duration
Section titled “duration”required
type: number | string
The duration of the video which can be a number of seconds or a string representing a duration in the ISO 8601 format.
---video: duration: 180 # 3 minutes------video: duration: P0Y0M0DT0H3M0S # 3 minutes---collection
Section titled “collection”required
type: string
The name of the collection the video belongs to which groups related videos together.
---video: collection: course---type: number
The optional order of the video in the collection. In collection pages listing all collection videos, videos are sorted by their order and then by title.
---video: order: 3---transcript
Section titled “transcript”type: string
The optional relative path from the root of the project to the transcript file of the video.
Transcripts are displayed at the bottom of the collection video page and can be used to provide a text version of the video content.
The transcript file must be in the SubRip format (.srt).
---video: transcript: ./src/assets/transcripts/example.srt---difficulty
Section titled “difficulty”type: string
An optional difficulty level of the video that will be displayed below the video player.
---video: difficulty: Beginner---actions
Section titled “actions”type: StarlightVideosAction[]
Optional call-to-action links displayed below the video player. Check the actions refernce for more information.