@@ -6,9 +6,8 @@ import { process } from "~/util/rehype";
66import rehypeExternalLinks from " ~/plugins/rehype/external-links" ;
77
88type DocsEntry = CollectionEntry <" docs" >;
9- type VideoEntry = CollectionEntry <" videos" >;
109
11- const tutorials: Array <DocsEntry | VideoEntry > = [];
10+ const tutorials: Array <DocsEntry > = [];
1211
1312const currentSection = Astro .params .slug ?.split (" /" )[0 ];
1413const currentProduct = await getEntry (" products" , currentSection ! );
@@ -20,8 +19,8 @@ if (!currentProduct) {
2019}
2120
2221const productTitle = currentProduct .data .product .title ;
23- const videoText = " 🎥 Video"
24- const tutorialText = " 📝 Tutorial"
22+ const videoText = " 🎥 Video" ;
23+ const tutorialText = " 📝 Tutorial" ;
2524
2625const docs = await getCollection (" docs" , (entry ) => {
2726 return (
@@ -38,14 +37,6 @@ const docs = await getCollection("docs", (entry) => {
3837
3938tutorials .push (... docs );
4039
41- const videos = await getCollection (" videos" , (entry ) => {
42- return entry .data .products .some (
43- (v : string ) => v .toUpperCase () === productTitle .toUpperCase (),
44- );
45- });
46-
47- tutorials .push (... videos );
48-
4940tutorials .sort ((a , b ) => Number (b .data .updated ) - Number (a .data .updated ));
5041
5142const timeAgo = (date ? : Date ) => {
0 commit comments