UseSeoMeta
katanakit-js / useSeoMeta
Function: useSeoMeta()
Section titled “Function: useSeoMeta()”function useSeoMeta<OmitKeys>(opts, defaults?): SeoTagResult;Defined in: config/seo.service.ts:55
SEO helper: one flat object in → one flat object out (+ html/tags).
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
OmitKeys extends keyof SeoMetaFlat | "site" | "siteTitle" | "lang" | "rss" | "seo" | "nav" |
never |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts |
UseSeoMetaOptions<OmitKeys> |
defaults? |
SiteConfig |
Returns
Section titled “Returns”Example
Section titled “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