import { Handlers, PageProps } from "$fresh/server.ts"; 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 { YoutubePlayer } from "@components/Youtube.tsx"; import { HashTags } from "@components/HashTags.tsx"; import { isYoutubeLink } from "@lib/string.ts"; import { renderMarkdown } from "@lib/documents.ts"; export const handler: Handlers
= { async GET(_, ctx) { const movie = await getArticle(ctx.params.name); return ctx.render(movie); }, }; export default function Greet(props: PageProps
) { const article = props.data; const { author = "", date = "" } = article.meta; const content = renderMarkdown(article.content); return ( ${article.name}`} context={article} > {article.tags.length > 0 && ( <>
)}
{isYoutubeLink(article.meta.link) && ( )}
          {content||""}
        
); }