feat(backend): og image and meta tags
This commit is contained in:
@ -9,6 +9,7 @@ import { renderMarkdown } from "@lib/documents.ts";
|
||||
import { RedirectSearchHandler } from "@islands/Search.tsx";
|
||||
import PageHero from "@components/PageHero.tsx";
|
||||
import { Star } from "@components/Stars.tsx";
|
||||
import { MetaTags } from "@components/MetaTags.tsx";
|
||||
|
||||
export const handler: Handlers<{ article: Article; session: unknown }> = {
|
||||
async GET(_, ctx) {
|
||||
@ -34,6 +35,7 @@ export default function Greet(
|
||||
>
|
||||
<RedirectSearchHandler />
|
||||
<KMenu type="main" context={{ type: "article" }} />
|
||||
<MetaTags resource={article} />
|
||||
|
||||
<PageHero image={article.meta.image} thumbnail={article.meta.thumbnail}>
|
||||
<PageHero.Header>
|
||||
|
@ -8,6 +8,7 @@ import { RedirectSearchHandler } from "@islands/Search.tsx";
|
||||
import { Recommendations } from "@islands/Recommendations.tsx";
|
||||
import PageHero from "@components/PageHero.tsx";
|
||||
import { Star } from "@components/Stars.tsx";
|
||||
import { MetaTags } from "@components/MetaTags.tsx";
|
||||
|
||||
export default async function Greet(
|
||||
props: PageProps<{ movie: Movie; session: Record<string, string> }>,
|
||||
@ -24,6 +25,7 @@ export default async function Greet(
|
||||
<MainLayout url={props.url} title={`Movie > ${movie.name}`} context={movie}>
|
||||
<RedirectSearchHandler />
|
||||
<KMenu type="main" context={movie} />
|
||||
<MetaTags resource={movie} />
|
||||
<PageHero
|
||||
image={movie.meta.image}
|
||||
thumbnail={movie.meta.thumbnail}
|
||||
|
@ -10,6 +10,7 @@ import PageHero from "@components/PageHero.tsx";
|
||||
import { Star } from "@components/Stars.tsx";
|
||||
import { renderMarkdown } from "@lib/documents.ts";
|
||||
import { isValidRecipe } from "@lib/recipeSchema.ts";
|
||||
import { MetaTags } from "@components/MetaTags.tsx";
|
||||
|
||||
export const handler: Handlers<{ recipe: Recipe; session: unknown } | null> = {
|
||||
async GET(_, ctx) {
|
||||
@ -79,6 +80,7 @@ export default function Greet(
|
||||
>
|
||||
<RedirectSearchHandler />
|
||||
<KMenu type="main" context={recipe} />
|
||||
<MetaTags resource={recipe} />
|
||||
|
||||
<PageHero image={recipe.meta?.image} thumbnail={recipe.meta?.thumbnail}>
|
||||
<PageHero.Header>
|
||||
|
@ -7,6 +7,7 @@ import { RedirectSearchHandler } from "@islands/Search.tsx";
|
||||
import { KMenu } from "@islands/KMenu.tsx";
|
||||
import PageHero from "@components/PageHero.tsx";
|
||||
import { Star } from "@components/Stars.tsx";
|
||||
import { MetaTags } from "@components/MetaTags.tsx";
|
||||
|
||||
export const handler: Handlers<{ serie: Series; session: unknown }> = {
|
||||
async GET(_, ctx) {
|
||||
@ -29,6 +30,7 @@ export default function Greet(
|
||||
<RedirectSearchHandler />
|
||||
<KMenu type="main" context={serie} />
|
||||
|
||||
<MetaTags resource={serie} />
|
||||
<PageHero image={serie.meta.image} thumbnail={serie.meta.thumbnail}>
|
||||
<PageHero.Header>
|
||||
<PageHero.BackLink href="/series" />
|
||||
|
Reference in New Issue
Block a user