types.ts#
5 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
5
symbols
3
interfaces
1
types
1
modules
1
parameters
18
members
1
returns
Reference#
interfaceOgImageOptionsOG image generation options (user-facing).
OG image generation options (user-facing).
Signature
export interface OgImageOptionsMembers
Properties
| Name | Type | Description |
|---|---|---|
cacheoptional |
boolean |
Enable content-hash based caching. Skips rendering when content hasn't changed. Default true |
concurrencyoptional |
number |
Number of concurrent page instances for parallel rendering. Default 1 |
heightoptional |
number |
Image height in pixels. Default 630 |
templateoptional |
string |
Path to a custom template file (.ts, .vue, .svelte, .tsx/.jsx). - .ts: default-export a function (props) => string- .vue: Vue SFC, rendered via SSR- .svelte: Svelte SFC, rendered via SSR- .tsx/.jsx: React Server Component, rendered via SSRIf not specified, the built-in default template is used. |
vuePluginoptional |
"vitejs" | "vizejs" |
Vue plugin to use for compiling .vue templates.- 'vitejs': Use @vue/compiler-sfc (official, default)- 'vizejs': Use @vizejs/vite-plugin (Rust-based)Default 'vitejs' |
widthoptional |
number |
Image width in pixels. Default 1200 |
typeOgImageTemplateFn = (props: OgImageTemplateProps) => string | Promise<string>Template function that receives page metadata and returns an HTML string.
Template function that receives page metadata and returns an HTML string.
Signature
export type OgImageTemplateFn = (props: OgImageTemplateProps) => string | Promise<string>Parameters
-
propsOgImageTemplateProps
Returns
string | Promise<string>
interfaceOgImageTemplatePropsProps passed to OG image template functions.
Props passed to OG image template functions.
Signature
export interface OgImageTemplatePropsMembers
Indexable
[key: string]: unknownCustom data from frontmatter (arbitrary key-value pairs)
Properties
| Name | Type | Description |
|---|---|---|
authoroptional |
string |
Author name |
descriptionoptional |
string |
Page description |
siteNameoptional |
string |
Site name |
tagsoptional |
string[] |
Tags/categories |
title |
string |
Page title |
interfaceResolvedOgImageOptionsResolved OG image options with all defaults applied.
Resolved OG image options with all defaults applied.
Signature
export interface ResolvedOgImageOptionsMembers
Properties
| Name | Type | Description |
|---|---|---|
cache |
boolean |
|
concurrency |
number |
|
height |
number |
|
templateoptional |
string |
|
vuePlugin |
"vitejs" | "vizejs" |
|
width |
number |
moduletypesType definitions for Chromium-based OG image generation.
Type definitions for Chromium-based OG image generation.