feat: add ability to scrape youtube video

This commit is contained in:
2023-08-02 15:56:33 +02:00
parent cebbb8af2b
commit ba853342bd
10 changed files with 193 additions and 36 deletions

View File

@ -3,8 +3,9 @@ import { MainLayout } from "@components/layouts/main.tsx";
import { Article, getArticle } from "@lib/resource/articles.ts";
import { RecipeHero } from "@components/RecipeHero.tsx";
import { KMenu } from "@islands/KMenu.tsx";
import { isYoutubeLink, YoutubePlayer } from "@components/Youtube.tsx";
import { YoutubePlayer } from "@components/Youtube.tsx";
import { HashTags } from "@components/HashTags.tsx";
import { isYoutubeLink } from "@lib/string.ts";
export const handler: Handlers<Article | null> = {
async GET(_, ctx) {

View File

@ -31,7 +31,13 @@ export default function Greet(props: PageProps<Article[] | null>) {
<KMenu type="main" context={false} />
<Grid>
{props.data?.map((doc) => {
return <Card link={`/articles/${doc.id}`} title={doc.name} />;
return (
<Card
image={"/placeholder.svg"}
link={`/articles/${doc.id}`}
title={doc.name}
/>
);
})}
</Grid>
</MainLayout>