feat: useNodeSeo

This commit is contained in:
2026-03-26 14:56:38 -04:00
parent a3122d12c3
commit c9a9e03b60
4 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import type { NodeSeoFragment } from "#graphql/types";
export function useNodeSeo(seo: NodeSeoFragment) {
const { title, description, robots, canonicalUrl, openGraph } = seo;
useSeoMeta({
title,
description,
robots: robots?.join(","),
ogTitle: openGraph?.title,
ogDescription: openGraph?.description,
ogImage: openGraph?.image?.url,
ogUrl: canonicalUrl,
});
}