File tree Expand file tree Collapse file tree 5 files changed +82
-0
lines changed
content/stream/example-video Expand file tree Collapse file tree 5 files changed +82
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 releaseNotesSchema ,
2222 fieldsSchema ,
2323 partialsSchema ,
24+ streamSchema ,
2425} from "~/schemas" ;
2526
2627function contentLoader ( name : string ) {
@@ -111,4 +112,8 @@ export const collections = {
111112 loader : dataLoader ( "fields" ) ,
112113 schema : fieldsSchema ,
113114 } ) ,
115+ stream : defineCollection ( {
116+ loader : dataLoader ( "stream" ) ,
117+ schema : streamSchema ,
118+ } ) ,
114119} ;
Original file line number Diff line number Diff line change 1+ id : streamid
2+ url : example-video
3+ title : Example Video
4+ description : A Super cool video
5+ products :
6+ - workers
7+ - workers-ai
8+ transcript : ./transcript.vtt
9+ chapters :
10+ 00:01 : Chapter 1
11+ 00:02 : Chapter 2
12+ thumbnail :
13+ url : https://example.com/foo.png
Original file line number Diff line number Diff line change 1+ WEBVTT
2+
3+ 00 : 11 . 000 --> 00 : 13 . 000
4+ <v Roger Bingham >We are in New York City
5+
6+ 00 : 13 . 000 --> 00 : 16 . 000
7+ <v Roger Bingham >We're actually at the Lucern Hotel, just down the street
8+
9+ 00 : 16 . 000 --> 00 : 18 . 000
10+ <v Roger Bingham >from the American Museum of Natural History
11+
12+ 00 : 18 . 000 --> 00 : 20 . 000
13+ <v Roger Bingham >And with me is Neil deGrasse Tyson
14+
15+ 00 : 20 . 000 --> 00 : 22 . 000
16+ <v Roger Bingham >Astrophysicist, Director of the Hayden Planetarium
17+
18+ 00 : 22 . 000 --> 00 : 24 . 000
19+ <v Roger Bingham >at the AMNH.
20+
21+ 00 : 24 . 000 --> 00 : 26 . 000
22+ <v Roger Bingham >Thank you for walking down here.
23+
24+ 00 : 27 . 000 --> 00 : 30 . 000
25+ <v Roger Bingham >And I want to do a follow-up on the last conversation we did.
26+
27+ 00 : 30 . 000 --> 00 : 31 . 500 align : right size : 50%
28+ <v Roger Bingham >When we e-mailed—
29+
30+ 00 : 30 . 500 --> 00 : 32 . 500 align : left size : 50%
31+ <v Neil deGrasse Tyson >Didn't we talk about enough in that conversation?
32+
33+ 00 : 32 . 000 --> 00 : 35 . 500 align : right size : 50%
34+ <v Roger Bingham >No! No no no no; 'cos 'cos obviously 'cos
35+
36+ 00 : 32 . 500 --> 00 : 33 . 500 align : left size : 50%
37+ <v Neil deGrasse Tyson ><i >Laughs </i >
38+
39+ 00 : 35 . 500 --> 00 : 38 . 000
40+ <v Roger Bingham >You know I'm so excited my glasses are falling off here.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export * from "./notifications";
1010export * from "./pages-build-environment" ;
1111export * from "./pages-framework-presets" ;
1212export * from "./partials" ;
13+ export * from "./stream" ;
1314export * from "./videos" ;
1415export * from "./warp-releases" ;
1516export * from "./workers-ai-models" ;
Original file line number Diff line number Diff line change 1+ import { z } from "astro:schema" ;
2+ import { reference } from "astro:content" ;
3+
4+ export const streamSchema = z . object ( {
5+ id : z . string ( ) ,
6+ url : z . string ( ) ,
7+ title : z . string ( ) ,
8+ description : z . string ( ) ,
9+ products : z . array ( reference ( "products" ) ) ,
10+ transcript : z . string ( ) . optional ( ) ,
11+ chapters : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) ,
12+ tags : z . array ( z . string ( ) ) . optional ( ) ,
13+ thumbnail : z
14+ . object ( {
15+ url : z . string ( ) ,
16+ } )
17+ . or (
18+ z . object ( {
19+ timestamp : z . string ( ) ,
20+ } ) ,
21+ )
22+ . optional ( ) ,
23+ } ) ;
You can’t perform that action at this time.
0 commit comments