Saltar al contenido principal

Function: useSeoMeta()

useSeoMeta<OmitKeys>(opts, defaults?): SeoTagResult

Defined in: src/config/seo.service.ts:60

SEO helper: one flat object in → one flat object out (+ html/tags).

Type Parameters

OmitKeys

OmitKeys extends "nav" | "site" | keyof SeoMetaFlat | "siteTitle" | "lang" | "rss" | "seo" = never

Parameters

opts

UseSeoMetaOptions<OmitKeys>

defaults?

SiteConfig = defaultSiteConfig

Returns

SeoTagResult

Example

const seo = useSeoMeta({
site: "https://example.com",
siteTitle: "My Site",
title: "Home",
description: "…",
ogImage: "https://example.com/image.png",
});
// seo.title, seo.site, seo.ogImage — once each
// seo.html / seo.tags — head injection