types.ts
73 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.
Reference
interfaceAttrsOptionsOptions for markdown-it-attrs style attribute blocks. Attribute blocks let auth…
Options for markdown-it-attrs style attribute blocks.
Attribute blocks let authors attach IDs, classes, and key/value attributes to nearby Markdown nodes with syntax such as {#install .lead}.
Signature
export interface AttrsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabledoptional |
boolean |
Enable the attrs transform when an options object is supplied. Set to false to keep the object shape while disabling the transform.This is mainly useful for config merging where callers want to preserve a stable object structure. Default true |
interfaceBuiltinEmbedOptionsBuilt-in embed configuration.
Built-in embed configuration.
Signature
export interface BuiltinEmbedOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
blueskyoptional |
boolean |
Render <Bluesky> as static cards.Default false |
githuboptional |
boolean | GitHubOptions |
Render <GitHub repo="owner/name" /> repository cards.Pass an options object to configure fetching. Default true |
openGraphoptional |
boolean | OgpOptions |
Render <OgCard url="https://example.com" /> Open Graph link cards.Pass an options object to configure fetching. Default true |
pmoptional |
boolean | BuiltinPmOptions |
Expand <pm>npm install …</pm> blocks into npm/pnpm/yarn/bun install tabs.Accepts a boolean to toggle the feature, or an options object to opt in to synced tab groups. Synced groups are OFF by default; when enabled with { sync: true }, selecting a package manager in one block selects it inevery other package-manager block on the page (persisted in localStorage). Default false |
spotifyoptional |
boolean |
Render <Spotify url="https://open.spotify.com/track/..."> iframes.Default false |
stackBlitzoptional |
boolean |
Render <StackBlitz url="https://stackblitz.com/edit/..."> iframes.Default false |
twitteroptional |
boolean | TwitterEmbedOptions |
Render <Tweet> / <XPost> as static privacy-conscious cards.Pass { fetch: true } to fetch the post body, author, and self-hostedmedia at build time. Fetch failures fall back to the link-only card. Default false |
webContaineroptional |
boolean |
Render <WebContainer> lazy placeholders with isolation metadata.Default false |
interfaceBuiltinPmOptionsOptions for the package-manager install-tab transform.
Options for the package-manager install-tab transform.
Signature
export interface BuiltinPmOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
syncoptional |
boolean |
Enable opt-in synced package-manager tab groups. Default false |
typeCodeAnnotationKind = "highlight" | "warning" | "error"Supported line annotation kinds for code blocks.
Supported line annotation kinds for code blocks.
Signature
export type CodeAnnotationKind = "highlight" | "warning" | "error"
interfaceCodeAnnotationsOptionsOpt-in code annotation configuration.
Opt-in code annotation configuration.
Signature
export interface CodeAnnotationsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
defaultLineNumbersoptional |
boolean |
Enable line numbers for all code blocks by default. In vitepress or both mode, fenced code blocks can override this with:line-numbers, :line-numbers=<start>, or :no-line-numbers.Default false |
metaKeyoptional |
string |
Attribute name read from the code fence meta string. Example: annotate="highlight:1,3-4;warning:6"Default "annotate" |
notationoptional |
CodeAnnotationSyntax |
Annotation syntax to enable. - attribute: custom attribute syntax like annotate="highlight:1,3-4"- vitepress: VitePress-compatible syntax like {1,3-4} and [!code warning]- both: enables both syntaxesDefault "attribute" |
typeCodeAnnotationSyntax = "attribute" | "vitepress" | "both"Supported code annotation syntaxes.
Supported code annotation syntaxes.
Signature
export type CodeAnnotationSyntax = "attribute" | "vitepress" | "both"
interfaceCodeBlockLintOptionsOptions for linting fenced code blocks during Markdown transforms. These checks…
Options for linting fenced code blocks during Markdown transforms.
These checks are intentionally local to each fence. They do not execute code or parse a project graph, so they are safe to run during normal Markdown transformation.
Signature
export interface CodeBlockLintOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
languagesoptional |
string[] |
Languages to lint. Omit to lint every fenced block language. Language names are compared case-insensitively. Default undefined |
modeoptional |
"warn" | "error" |
Diagnostic severity for lint failures. Use 'error' when code-block lint failures should fail the build.Default 'warn' |
requireLanguageoptional |
boolean |
Require every fenced code block to declare a language. This is helpful for documentation sites where every example should be highlighted and searchable by language. Default false |
trailingSpacesoptional |
boolean |
Report trailing whitespace inside fenced code blocks. The check reports the exact line and column range inside the fence content. Default true |
interfaceCodeBlockTypecheckOptionsOptions for type-checking TypeScript and TSX fenced code blocks. Type-checking…
Options for type-checking TypeScript and TSX fenced code blocks.
Type-checking writes matching snippets to a temporary directory and invokes tsgo. It is best suited for concise examples that should stay synchronized with the public TypeScript API.
Signature
export interface CodeBlockTypecheckOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
languagesoptional |
string[] |
Fence languages to type-check. Language names are compared case-insensitively. Default ['ts', 'tsx'] |
modeoptional |
"warn" | "error" |
Diagnostic severity for type-check failures. Use 'error' to fail the Markdown transform on broken snippets.Default 'warn' |
requireMetaoptional |
boolean |
Require an opt-in fence meta marker before type-checking. When enabled, only fences with metadata such as typecheck or twoslashare checked. Default true |
tsgoCommandoptional |
string |
Command used to run the TypeScript checker. Override this for package-manager scripts or workspace-local binaries. Default 'tsgo' |
interfaceCodeImportOptionsOptions for importing source snippets into code fences. The transform resolves…
Options for importing source snippets into code fences.
The transform resolves <<< imports before code highlighting and other code-block features run. Imported snippets therefore behave like ordinary fenced code in later stages.
Signature
export interface CodeImportOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
rootDiroptional |
string |
Directory used to resolve <<< imports.When omitted, imports resolve from the Vite project root and configured aliases. Default undefined |
interfaceCollectionEntryQueryable Markdown collection entry.
Queryable Markdown collection entry.
Signature
export interface CollectionEntry
Members
Indexable
[key: string]: unknownProperties
| Name | Type | Description |
|---|---|---|
bodyoptional |
string |
|
collection |
string |
|
descriptionoptional |
string |
|
extension |
string |
|
frontmatter |
Record<string, unknown> |
|
htmloptional |
string |
|
id |
string |
|
path |
string |
|
source |
string |
|
stem |
string |
|
title |
string |
|
tocoptional |
TocEntry[] |
typeCollectionIncludeField = "body" | "html" | "toc"Extra payload fields embedded into collection entries. Keep this list small for…
Extra payload fields embedded into collection entries.
Keep this list small for large sites. By default collection entries contain only route metadata and frontmatter. body, html, and toc increase the virtual module size, and html/toc require a native Markdown transform.
Signature
export type CollectionIncludeField = "body" | "html" | "toc"
interfaceCollectionManifestGenerated collection manifest.
Generated collection manifest.
Signature
export interface CollectionManifest
Members
Properties
| Name | Type | Description |
|---|---|---|
collections |
Record<string, CollectionEntry[]> |
interfaceCollectionOptionsCollection source configuration.
Collection source configuration.
Signature
export interface CollectionOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
includeoptional |
readonly CollectionIncludeField[] |
Optional fields to include in each entry. The default is metadata-only for performance. Use body for stripped rawMarkdown, html for native rendered HTML, and toc for the parsed tableof contents. Default [] |
sourceoptional |
string | readonly string[] |
Glob pattern(s) resolved from srcDir.Patterns are filtered by the configured Markdown extensions. Numeric route prefixes such as 1.guide/2.install.md are stripped from generated path.Default all Markdown files |
typeCollectionsOptions = Record<string, CollectionOptions | string | readonly string[]>Top-level collection definitions.
Top-level collection definitions.
Signature
export type CollectionsOptions = Record<string, CollectionOptions | string | readonly string[]>
interfaceDocEntryA single documentation entry extracted from source. Entries represent top-level…
A single documentation entry extracted from source.
Entries represent top-level declarations such as functions, classes, interfaces, type aliases, enums, variables, and modules. Members of compound declarations are stored in members.
Signature
export interface DocEntry
Members
Properties
| Name | Type | Description |
|---|---|---|
description |
string |
Main prose extracted from the leading JSDoc/TSDoc block. |
endLine |
number |
1-based end line of the declaration in the source file. |
examplesoptional |
string[] |
Code examples collected from @example tags. |
file |
string |
Source file path relative to the extraction root when available. |
kind |
"function" | "class" | "interface" | "type" | "enum" | "variable" | "module" |
Normalized declaration kind used for grouping and rendering. |
line |
number |
1-based start line of the declaration in the source file. |
membersoptional |
DocMember[] |
Members belonging to classes, interfaces, object types, and enums. |
name |
string |
Exported or declared symbol name. |
paramsoptional |
ParamDoc[] |
Function, method, or constructor parameter documentation. |
privateoptional |
boolean |
True when the entry is marked private or matched by private filtering. |
returnsoptional |
ReturnDoc |
Return value documentation for callable declarations. |
signatureoptional |
string |
Full declaration signature, when the renderer can extract one. |
tagsoptional |
Record<string, string> |
Additional tags preserved by tag name after known tags are normalized. |
throwsoptional |
ThrowsDoc[] |
Exceptions/errors documented with @throws / @exception. |
interfaceDocMemberA member belonging to a class, interface, type alias, or enum entry.
A member belonging to a class, interface, type alias, or enum entry.
Signature
export interface DocMember
Members
Properties
| Name | Type | Description |
|---|---|---|
defaultoptional |
string |
Default value extracted from syntax or @default tags. |
description |
string |
Main prose extracted from the member's documentation comment. |
endLine |
number |
1-based end line of the member declaration. |
kind |
"property" | "method" | "constructor" | "getter" | "setter" | "enumMember" |
Normalized member kind used for rendering and sorting. |
line |
number |
1-based start line of the member declaration. |
name |
string |
Member name as it appears in the containing declaration. |
optionaloptional |
boolean |
True when the member is optional in the source declaration. |
paramsoptional |
ParamDoc[] |
Parameter documentation for methods and constructors. |
privateoptional |
boolean |
True when the member is marked private or matched by private filtering. |
readonlyoptional |
boolean |
True when the member is declared readonly. |
returnsoptional |
ReturnDoc |
Return value documentation for methods and accessors. |
signatureoptional |
string |
Full member signature, when available. |
staticoptional |
boolean |
True when the member is static. |
tagsoptional |
Record<string, string> |
Additional tags preserved by tag name after known tags are normalized. |
throwsoptional |
ThrowsDoc[] |
Exceptions/errors documented with @throws / @exception. |
typeoptional |
string |
Rendered TypeScript type text for properties and enum members. |
typeDocsEntryPoint = string | { path: string; name?: string }Public API entry point for grouped documentation.
Public API entry point for grouped documentation.
Signature
export type DocsEntryPoint = string | { path: string; name?: string }
interfaceDocsOptionsOptions for source documentation generation. The generator extracts JSDoc/TSDoc…
Options for source documentation generation.
The generator extracts JSDoc/TSDoc comments from JavaScript and TypeScript source files, normalizes the declarations, and writes Markdown plus optional navigation metadata. The defaults are optimized for documenting a package's public src tree without exposing private implementation details.
Signature
export interface DocsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
basePathoptional |
string |
Route prefix used by generated documentation links and nav metadata. Nav metadata falls back to /api when this is not set.Default undefined |
classPropertiesFormatoptional |
MarkdownDisplayFormat |
Display format for class property groups. Default 'none' |
enabledoptional |
boolean |
Enable source documentation generation. The top-level docs option is opt-out: omitting it enables docs generationwith defaults, while docs: false disables the docs plugin entirely.Default true |
entryPointsoptional |
DocsEntryPoint[] |
Public API entry points used to group re-exported docs. When omitted, docs are generated from the discovered source files without entry-point grouping. Use entry points when a package exposes a smaller public surface than its source tree. Re-exported declarations are grouped under the entry point that exposes them. Default undefined |
enumMembersFormatoptional |
MarkdownDisplayFormat |
Display format for enum member groups. Default 'none' |
excludeoptional |
string[] |
Glob patterns for files to exclude. Excludes run after include matching and should cover tests, generatedfiles, and implementation-only entry points. Default ['**\/*.test.*', '**\/*.spec.*', 'node_modules'] |
formatoptional |
"markdown" | "json" | "html" |
Output format. markdown is the primary supported format. json and html are reservedfor consumers that want to post-process extracted documentation data. Default 'markdown' |
generateNavoptional |
boolean |
Generate navigation metadata file. Default true |
githubUrloptional |
string |
GitHub repository URL for source code links. When provided, generated documentation includes links back to the source declaration lines. Default undefined |
groupByoptional |
"file" | "category" |
Group documentation by file or category. Default 'file' |
groupOrderoptional |
string[] |
TypeDoc-style group order for module index sections and nav groups. Use * as the insertion point for unlisted groups.Default undefined |
includeoptional |
string[] |
Glob patterns for files to include. Patterns are evaluated inside each src directory.Default ['**\/*.ts', '**\/*.tsx', '**\/*.js', '**\/*.jsx', '**\/*.mts', '**\/*.mjs', '**\/*.cts', '**\/*.cjs'] |
indexFormatoptional |
MarkdownDisplayFormat |
Display format for index items. Default 'none' |
interfacePropertiesFormatoptional |
MarkdownDisplayFormat |
Display format for interface property groups. Default 'none' |
internaloptional |
boolean |
Include internal members in documentation. Default false |
kindSortOrderoptional |
string[] |
TypeDoc-style declaration kind ranking for module sections and nav groups. Default undefined |
linkStyleoptional |
"markdown" | "clean" |
Internal documentation link style. Use markdown for generated .md targets and clean for route-style linksconsumed by static-site frameworks. Default 'markdown' |
outoptional |
string |
Output directory for generated documentation. The path is resolved from the Vite project root. Markdown pages, docs.json,and generated navigation metadata are written under this directory. Default 'docs/api' |
parametersFormatoptional |
MarkdownDisplayFormat |
Display format for value and type parameters. Default 'none' |
pathStrategyoptional |
"flat" | "typedoc" |
Generated Markdown output path strategy. flat emits one page per source module or category. typedoc emitsTypeDoc-like module, kind, and symbol pages for larger API references. Default 'flat' |
privateoptional |
boolean |
Include private members in documentation. Default false |
propertyMembersFormatoptional |
MarkdownDisplayFormat |
Display format for property-owned object literal members. Default 'none' |
renderGeneratedByoptional |
boolean |
Emit the generated-by attribution on generated root index pages. Default true |
renderStatsoptional |
boolean |
Emit the stats summary line on generated index pages. Default true |
renderStyleoptional |
"html" | "markdown" |
Rendering style for generated API Markdown. - 'html' (default): HTML-laced Markdown with collapsible entries, statblocks and member tables (ox-content theme). - 'markdown': pure Markdown (headings, tables, fenced code) with no rawHTML scaffolding, suitable for plain Markdown hosts such as VitePress. Default 'html' |
singleEntryRootoptional |
"preserve" | "flatten" |
Single-entry root handling for TypeDoc-style generated docs. When set to 'flatten', a single TypeDoc entry point uses the rootindex.md as its landing page and omits the extra module level fromgenerated nav metadata. Symbol page paths stay under the entry point. Default 'preserve' |
sortoptional |
DocsSortStrategy[] |
TypeDoc-style sort strategies applied to entries and members. Strategies run in order; later strategies break ties from earlier ones. Default undefined |
sortEntryPointsoptional |
boolean |
Preserve caller-provided entry point order when false. Default true |
srcoptional |
string[] |
Source directories to scan for documentation. Paths are resolved from the Vite project root before applying include andexclude patterns.Default ['./src'] |
tocoptional |
boolean |
Generate table of contents for each file. Reserved for future use; current generated API pages do not emit this TOC. Default false |
typeAliasPropertiesFormatoptional |
MarkdownDisplayFormat |
Display format for type alias property groups. Default 'none' |
typeDeclarationFormatoptional |
MarkdownDisplayFormat |
Display format for return type declaration members. Default 'none' |
typeParametersoptional |
boolean |
Opt in to TSDoc-style type-parameter documentation. When enabled, declaration type parameters ( <T extends C = D>) areextracted into a structured "Type Parameters" section and @typeParam /@template tags are merged in (and removed from the generic tag list).@typeParam is a TSDoc feature, so this is off by default (JSDoc semantics).Default false |
interfaceDocsSummarySummary counts emitted with generated documentation data.
Summary counts emitted with generated documentation data.
Signature
export interface DocsSummary
Members
Properties
| Name | Type | Description |
|---|---|---|
byKind |
Record<string, number> |
Entry counts grouped by normalized declaration kind. |
deprecated |
number |
Number of entries or members marked with @deprecated. |
entries |
number |
Number of top-level entries across all modules. |
examples |
number |
Number of collected examples. |
modules |
number |
Number of modules included in the generated payload. |
params |
number |
Number of documented parameters. |
returns |
number |
Number of documented return values. |
interfaceDocsTestOptionsOptions for extracting fenced examples into docs-as-tests fixtures. The extract…
Options for extracting fenced examples into docs-as-tests fixtures.
The extractor collects code fences that can be written into test files and executed by the exported docs test harness helpers.
Signature
export interface DocsTestOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
languagesoptional |
string[] |
Fence languages to collect as runnable examples. Language names are compared case-insensitively. Default ['js', 'jsx', 'ts', 'tsx'] |
requireMetaoptional |
boolean |
Require an opt-in fence meta marker before collecting an example. When enabled, only fences marked with metadata such as test, runnable,vitest, or docs-test are collected.Default true |
interfaceEditThisPageOptionsOptions for appending an "edit this page" link. The generated link points at th…
Options for appending an "edit this page" link.
The generated link points at the source Markdown file rather than the emitted HTML route. Configure branch and rootDir to match the repository layout users should edit.
Signature
export interface EditThisPageOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
branchoptional |
string |
Branch used in generated edit links. Use the branch that accepts documentation changes, not necessarily the branch that produced the deployed site. Default 'main' |
labeloptional |
string |
Link text rendered in the page footer. Keep this short; the default theme renders it as a compact footer action. Default 'Edit this page' |
repoUrl |
string |
Repository URL used to build edit links. The transform is enabled only when this value is provided. |
rootDiroptional |
string |
Source root inside the repository, used before the page path. Set this when srcDir is nested in a package or docs workspace.Default undefined |
interfaceEmojiShortcodeOptionsOptions for expanding :shortcode: emoji aliases. The transform replaces recogni…
Options for expanding :shortcode: emoji aliases.
The transform replaces recognized shortcode tokens with their Unicode emoji equivalents during Markdown transformation. Unknown shortcodes are left untouched so colon-delimited text can still be used by other tools.
Signature
export interface EmojiShortcodeOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
customoptional |
Record<string, string> |
Custom shortcode map merged with the built-in emoji aliases. Keys should omit the surrounding colons. Default {} |
interfaceEntryPageConfigEntry page frontmatter configuration.
Entry page frontmatter configuration.
Signature
export interface EntryPageConfig
Members
Properties
| Name | Type | Description |
|---|---|---|
featuresoptional |
FeatureConfig[] |
Feature cards |
herooptional |
HeroConfig |
Hero section |
layout |
"entry" |
Layout type - set to 'entry' for entry page |
interfaceExtractedDocsExtracted documentation for a single file.
Extracted documentation for a single file.
Signature
export interface ExtractedDocs
Members
Properties
| Name | Type | Description |
|---|---|---|
descriptionoptional |
string |
Optional module-level description extracted from a file header comment. |
entries |
DocEntry[] |
Top-level documented declarations found in this module. |
examplesoptional |
string[] |
Module-level examples collected from a file header comment. |
file |
string |
Source module or file identifier used by generated output. |
sourcePathoptional |
string |
Absolute source path, when available for source links and diagnostics. |
tagsoptional |
Record<string, string> |
Module-level tags preserved by tag name. |
interfaceFeatureConfigFeature card for entry page.
Feature card for entry page.
Signature
export interface FeatureConfig
Members
Properties
| Name | Type | Description |
|---|---|---|
detailsoptional |
string |
Feature description |
iconoptional |
string |
Icon - supports: "mdi:icon-name" (Iconify), image URL, or emoji |
linkoptional |
string |
Optional link |
linkTextoptional |
string |
Link text |
title |
string |
Feature title |
interfaceGeneratedDocsDataMachine-readable payload emitted alongside generated docs.
Machine-readable payload emitted alongside generated docs.
Signature
export interface GeneratedDocsData
Members
Properties
| Name | Type | Description |
|---|---|---|
generatedAt |
string |
ISO timestamp for the generation run. |
modules |
ExtractedDocs[] |
Extracted documentation modules in render order. |
summary |
DocsSummary |
Aggregate counts useful for dashboards and generated index pages. |
version |
1 |
Payload schema version. Increment when the JSON shape changes incompatibly. |
interfaceHeroActionHero section action button.
Hero section action button.
Signature
export interface HeroAction
Members
Properties
| Name | Type | Description |
|---|---|---|
link |
string |
Link URL |
text |
string |
Button text |
themeoptional |
"brand" | "alt" |
Button theme: 'brand' (primary) or 'alt' (secondary) |
interfaceHeroConfigHero section configuration for entry page.
Hero section configuration for entry page.
Signature
export interface HeroConfig
Members
Properties
| Name | Type | Description |
|---|---|---|
actionsoptional |
HeroAction[] |
Action buttons |
imageoptional |
HeroImage |
Hero image |
nameoptional |
string |
Main title (large, gradient text) |
noticeoptional |
HeroNotice |
Notice shown near the top of the hero |
taglineoptional |
string |
Tagline (smaller, muted) |
textoptional |
string |
Secondary text (medium size) |
interfaceHeroImageHero section image configuration.
Hero section image configuration.
Signature
export interface HeroImage
Members
Properties
| Name | Type | Description |
|---|---|---|
altoptional |
string |
Alt text |
darkSrcoptional |
string |
Dark mode image source URL |
heightoptional |
number |
Image height |
lightSrcoptional |
string |
Light mode image source URL |
src |
string |
Image source URL |
widthoptional |
number |
Image width |
interfaceHeroNoticeHero notice configuration.
Hero notice configuration.
Signature
export interface HeroNotice
Members
Properties
| Name | Type | Description |
|---|---|---|
bodyoptional |
string[] |
Notice paragraphs |
titleoptional |
string |
Notice title |
interfaceI18nOptionsi18n (internationalization) options. i18n is opt-in because it changes routing…
i18n (internationalization) options.
i18n is opt-in because it changes routing and build-time validation. Set enabled: true and configure at least defaultLocale / locales when the same content tree should serve multiple languages.
Signature
export interface I18nOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
checkoptional |
boolean |
Run i18n checks during build. Checks validate dictionary coverage and translation function usage when the native i18n checker is available. Default true |
defaultLocaleoptional |
string |
Default locale tag. The default locale is added to locales automatically when omitted from thelist. Default 'en' |
diroptional |
string |
Path to i18n dictionary directory (relative to project root). Dictionary files are watched in development and checked during builds when check is enabled.Default 'content/i18n' |
enabledoptional |
boolean |
Enable i18n. The resolver returns false unless this is explicitly set to true.Default false |
functionNamesoptional |
string[] |
Translation function names to detect in source code. Add framework-specific wrappers here so build-time checks can find all translation keys. Default ['t', '$t'] |
hideDefaultLocaleoptional |
boolean |
Hide default locale prefix in URLs. When true, /page serves the default locale and /ja/page serves Japanese.When false, all locales get prefixed: /en/page, /ja/page.Default true |
localesoptional |
LocaleConfig[] |
Available locales. When omitted, ox-content creates a single locale from defaultLocale.Default [{ code: defaultLocale, name: defaultLocale }] |
interfaceLocaleConfigLocale configuration. Locales define the routing and display metadata used by t…
Locale configuration.
Locales define the routing and display metadata used by the i18n plugin.
Signature
export interface LocaleConfig
Members
Properties
| Name | Type | Description |
|---|---|---|
code |
string |
BCP 47 locale tag (e.g., 'en', 'ja', 'zh-Hans'). |
diroptional |
"ltr" | "rtl" |
Text direction for rendered pages. Default 'ltr' |
name |
string |
Display name for this locale (e.g., 'English', '日本語'). |
interfaceMarkdownNodeMarkdown AST node (simplified for TypeScript).
Markdown AST node (simplified for TypeScript).
Signature
export interface MarkdownNode
Members
Indexable
[key: string]: unknownProperties
| Name | Type | Description |
|---|---|---|
childrenoptional |
MarkdownNode[] |
|
type |
string |
|
valueoptional |
string |
interfaceMarkdownTransformerCustom AST transformer.
Custom AST transformer.
Signature
export interface MarkdownTransformer
Members
Properties
| Name | Type | Description |
|---|---|---|
name |
string |
Transformer name. |
transform |
(ast: MarkdownNode, context: TransformContext) => MarkdownNode | Promise<MarkdownNode> |
Transform function.
|
interfaceOgImageOptionsOG image generation options. Uses Chromium-based rendering with customizable te…
OG image generation options. Uses Chromium-based rendering with customizable templates.
Signature
export interface OgImageOptions
Members
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 |
interfaceOxContentOptionsOptions for the core oxContent() Vite plugin. The top-level options describe wh…
Options for the core oxContent() Vite plugin.
The top-level options describe where content lives, which Markdown features are enabled, and which build-time features should run. Feature toggles that accept boolean | Options follow the same convention:
falsedisables the feature.trueenables the feature with its documented defaults.- an object enables the feature and overrides only the provided fields.
Signature
export interface OxContentOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
attrsoptional |
boolean | AttrsOptions |
Enable markdown-it-attrs style {#id .class key=value} attributes.Attribute blocks can be attached to headings, paragraphs, links, images, and other supported Markdown nodes depending on parser context. Default false |
autolinksoptional |
boolean |
Enable GFM autolinks and linkify bare URLs. Default true |
baseoptional |
string |
Base path prepended to generated internal URLs. Use this when the site is deployed below a sub-path, such as GitHub Pages or a documentation route inside a larger application. Default '/' |
cjkEmphasisoptional |
boolean |
Recognize emphasis adjacent to CJK text. The native parser already supports this behavior; the option documents the compatibility contract. Default false |
codeAnnotationsoptional |
boolean | CodeAnnotationsOptions |
Code block line annotations for fenced code blocks. This feature is opt-in because it changes rendered code-block markup. Pass true to enable ox-content's attribute syntax, or pass an options object tochange the meta key or enable VitePress-compatible notation. Default false |
codeBlockLintoptional |
boolean | CodeBlockLintOptions |
Lint fenced code blocks during Markdown transforms. Use this as a lightweight authoring check for missing languages or trailing whitespace inside fences. For project-wide linting, prefer the exported lintCodeBlocks() helper or the Markdown lint APIs.Default false |
codeBlockTypecheckoptional |
boolean | CodeBlockTypecheckOptions |
Type-check TypeScript/TSX code fences via tsgo. By default only fences with explicit opt-in metadata are checked. This keeps incidental examples cheap while allowing docs-as-code snippets to fail the build when configured with mode: 'error'.Default false |
codeImportsoptional |
boolean | CodeImportOptions |
Import source snippets into fences with <<< @/path/to/file.ts{region}.This is useful for documentation that must stay synchronized with examples in the repository. Use rootDir when snippets should resolve from adirectory other than the Vite project root. Default false |
collectionsoptional |
CollectionsOptions | boolean |
Markdown collection query options. Collections are exposed through virtual:ox-content/collections. Thedefault collection is metadata-only and is built by the native Rust manifest builder without rendering every document; add include fieldsonly for routes that need raw or rendered content in the query payload. Default content collection for all Markdown files |
docsoptional |
DocsOptions | false |
Source documentation generation options. Set to false to disable (opt-out). Default { enabled: true } |
docsTestsoptional |
boolean | DocsTestOptions |
Extract runnable fenced examples for Vitest docs-as-tests harnesses. Collected examples can be written by the docs test helpers and executed as part of a normal Vitest suite. Default false |
editThisPageoptional |
boolean | EditThisPageOptions |
Append an "edit this page" link to rendered Markdown. The feature is enabled only when repoUrl is provided in the options object.Passing true keeps the feature disabled because there is not enoughrepository information to generate valid links. Default false |
embedsoptional |
BuiltinEmbedOptions | false |
Built-in static embeds rendered during Markdown transformation. Set to false to disable all built-in embeds.Default { github: true, openGraph: true } |
emojiShortcodesoptional |
boolean | EmojiShortcodeOptions |
Expand :shortcode: emoji aliases to Unicode.Built-in aliases cover common emoji names. Provide custom entries forproject-specific aliases or to override a built-in mapping. Default false |
extensionsoptional |
string[] |
Markdown-like file extensions to process. Extensions are normalized with a leading dot and matched case-insensitively. Add custom extensions when another authoring format is compiled to Markdown before ox-content sees it. Default ['.md', '.markdown', '.mdx'] |
footnotesoptional |
boolean |
Enable footnotes. Default true |
frontmatteroptional |
boolean |
Parse YAML frontmatter. Default true |
gfmoptional |
boolean |
Enable GitHub Flavored Markdown extensions. Default true |
highlightoptional |
boolean |
Enable syntax highlighting for code blocks. Default false |
highlightLangsoptional |
LanguageRegistration[] |
Additional languages for syntax highlighting. Accepts Shiki LanguageRegistration objects (e.g., TextMate grammars). These are loaded alongside the built-in languages. Default [] |
highlightThemeoptional |
string | ThemeRegistration |
Syntax highlighting theme. Default 'github-dark' |
i18noptional |
I18nOptions | false |
i18n (internationalization) options. Set to false to disable i18n. Default false |
mermaidoptional |
boolean |
Enable mermaid diagram rendering. Default false |
ogImageoptional |
boolean |
Enable OG image generation. Default false |
ogImageOptionsoptional |
OgImageOptions |
OG image generation options. Ignored unless ogImage or ssg.generateOgImage is enabled.Default { vuePlugin: 'vitejs', width: 1200, height: 630, cache: true, concurrency: 1 } |
ogVieweroptional |
boolean |
Enable OG Viewer dev tool. Accessible at /__og-viewer during development. Default true |
outDiroptional |
string |
Directory where generated files are written. SSG HTML, search indexes, and generated assets are emitted under this directory during production builds. Default 'dist' |
sanitizeoptional |
boolean | SanitizeOptions |
Sanitize rendered HTML with safe defaults or explicit allow lists. Enable this for untrusted Markdown. The default allow lists are conservative; pass an options object only when the content model intentionally needs extra tags, attributes, or URL schemes. Default false |
searchoptional |
SearchOptions | boolean |
Full-text search options. Set to false to disable search. Default { enabled: true } |
srcDiroptional |
string |
Directory containing Markdown source files. The path is resolved from the Vite project root. SSG, search indexing, and dev-server routing all use this directory as the content root. Default 'content' |
ssgoptional |
SsgOptions | boolean |
Static Site Generation options. Passing true or omitting this option enables SSG with defaults. Passingfalse disables the SSG plugin while still allowing Markdown moduletransforms to run. Default { enabled: true } |
strikethroughoptional |
boolean |
Enable strikethrough. Default true |
tablesoptional |
boolean |
Enable tables. Default true |
taskListsoptional |
boolean |
Enable task lists. Default true |
tocoptional |
boolean |
Generate table of contents. Default true |
tocMaxDepthoptional |
number |
Maximum heading depth for TOC. Default 3 |
transformersoptional |
MarkdownTransformer[] |
Custom AST transformers. Transformers run after parsing and before the final JavaScript module is emitted. Default [] |
wikiLinksoptional |
boolean | WikiLinkOptions |
Expand Obsidian-style [[page]] and [[page|label]] links.Use this for knowledge-base style content where authors prefer short, document-relative link syntax. Pass an object to override the base URL used when resolving generated hrefs. Default false |
interfaceParamDocParameter documentation.
Parameter documentation.
Signature
export interface ParamDoc
Members
Properties
| Name | Type | Description |
|---|---|---|
defaultoptional |
string |
Default value extracted from syntax or @default tags. |
description |
string |
Prose extracted from @param / @arg documentation. |
name |
string |
Parameter name, including dotted names for destructured properties. |
optionaloptional |
boolean |
True when the parameter is optional. |
type |
string |
Rendered TypeScript type text. |
interfaceResolvedAttrsOptionsResolved attrs transform options.
Resolved attrs transform options.
Signature
export interface ResolvedAttrsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
interfaceResolvedBuiltinEmbedOptionsResolved built-in embed configuration.
Resolved built-in embed configuration.
Signature
export interface ResolvedBuiltinEmbedOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
bluesky |
boolean |
|
github |
GitHubOptions | false |
|
openGraph |
OgpOptions | false |
|
pm |
BuiltinPmOptions | false |
|
spotify |
boolean |
|
stackBlitz |
boolean |
|
twitter |
TwitterEmbedOptions | false |
|
webContainer |
boolean |
interfaceResolvedCodeAnnotationsOptionsResolved code annotation configuration.
Resolved code annotation configuration.
Signature
export interface ResolvedCodeAnnotationsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
defaultLineNumbers |
boolean |
|
enabled |
boolean |
|
metaKey |
string |
|
notation |
CodeAnnotationSyntax |
interfaceResolvedCodeBlockLintOptionsResolved code-block lint options.
Resolved code-block lint options.
Signature
export interface ResolvedCodeBlockLintOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
|
languagesoptional |
string[] |
|
mode |
"warn" | "error" |
|
requireLanguage |
boolean |
|
trailingSpaces |
boolean |
interfaceResolvedCodeBlockTypecheckOptionsResolved code-block type-check options.
Resolved code-block type-check options.
Signature
export interface ResolvedCodeBlockTypecheckOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
|
languages |
string[] |
|
mode |
"warn" | "error" |
|
requireMeta |
boolean |
|
tsgoCommand |
string |
interfaceResolvedCodeImportOptionsResolved code-import transform options.
Resolved code-import transform options.
Signature
export interface ResolvedCodeImportOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
|
rootDiroptional |
string |
interfaceResolvedCollectionOptionsResolved collection definition.
Resolved collection definition.
Signature
export interface ResolvedCollectionOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
include |
CollectionIncludeField[] |
|
name |
string |
|
source |
string[] |
interfaceResolvedCollectionsOptionsResolved collection options.
Resolved collection options.
Signature
export interface ResolvedCollectionsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
collections |
Record<string, ResolvedCollectionOptions> |
|
enabled |
boolean |
interfaceResolvedDocsEntryPointResolved public API entry point.
Resolved public API entry point.
Signature
export interface ResolvedDocsEntryPoint
Members
Properties
| Name | Type | Description |
|---|---|---|
nameoptional |
string |
|
path |
string |
interfaceResolvedDocsOptionsResolved docs options with all defaults applied.
Resolved docs options with all defaults applied.
Signature
export interface ResolvedDocsOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
basePathoptional |
string |
|
classPropertiesFormat |
MarkdownDisplayFormat |
|
enabled |
boolean |
|
entryPointsoptional |
ResolvedDocsEntryPoint[] |
|
enumMembersFormat |
MarkdownDisplayFormat |
|
exclude |
string[] |
|
format |
"markdown" | "json" | "html" |
|
generateNav |
boolean |
|
githubUrloptional |
string |
|
groupBy |
"file" | "category" |
|
groupOrderoptional |
string[] |
|
include |
string[] |
|
indexFormat |
MarkdownDisplayFormat |
|
interfacePropertiesFormat |
MarkdownDisplayFormat |
|
internal |
boolean |
|
kindSortOrderoptional |
string[] |
|
linkStyle |
"markdown" | "clean" |
|
out |
string |
|
parametersFormat |
MarkdownDisplayFormat |
|
pathStrategy |
"flat" | "typedoc" |
|
private |
boolean |
|
propertyMembersFormat |
MarkdownDisplayFormat |
|
renderGeneratedBy |
boolean |
|
renderStats |
boolean |
|
renderStyle |
"html" | "markdown" |
|
singleEntryRoot |
"preserve" | "flatten" |
|
sortoptional |
DocsSortStrategy[] |
|
sortEntryPoints |
boolean |
|
src |
string[] |
|
toc |
boolean |
|
typeAliasPropertiesFormat |
MarkdownDisplayFormat |
|
typeDeclarationFormat |
MarkdownDisplayFormat |
|
typeParameters |
boolean |
interfaceResolvedDocsTestOptionsResolved docs-as-tests extraction options.
Resolved docs-as-tests extraction options.
Signature
export interface ResolvedDocsTestOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
|
languages |
string[] |
|
requireMeta |
boolean |
interfaceResolvedEditThisPageOptionsResolved edit-link transform options.
Resolved edit-link transform options.
Signature
export interface ResolvedEditThisPageOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
branch |
string |
|
enabled |
boolean |
|
label |
string |
|
repoUrloptional |
string |
|
rootDiroptional |
string |
interfaceResolvedEmojiShortcodeOptionsResolved emoji-shortcode transform options.
Resolved emoji-shortcode transform options.
Signature
export interface ResolvedEmojiShortcodeOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
custom |
Record<string, string> |
|
enabled |
boolean |
interfaceResolvedI18nOptionsResolved i18n options with all defaults applied.
Resolved i18n options with all defaults applied.
Signature
export interface ResolvedI18nOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
check |
boolean |
|
defaultLocale |
string |
|
dir |
string |
|
enabled |
boolean |
|
functionNames |
string[] |
|
hideDefaultLocale |
boolean |
|
locales |
LocaleConfig[] |
interfaceResolvedOgImageOptionsResolved OG image options with all defaults applied.
Resolved OG image options with all defaults applied.
Signature
export interface ResolvedOgImageOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
cache |
boolean |
|
concurrency |
number |
|
height |
number |
|
templateoptional |
string |
|
vuePlugin |
"vitejs" | "vizejs" |
|
width |
number |
interfaceResolvedOptionsResolved options with all defaults applied.
Resolved options with all defaults applied.
Signature
export interface ResolvedOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
attrs |
ResolvedAttrsOptions |
|
autolinks |
boolean |
|
base |
string |
|
cjkEmphasis |
boolean |
|
codeAnnotations |
ResolvedCodeAnnotationsOptions |
|
codeBlockLint |
ResolvedCodeBlockLintOptions |
|
codeBlockTypecheck |
ResolvedCodeBlockTypecheckOptions |
|
codeImports |
ResolvedCodeImportOptions |
|
collections |
ResolvedCollectionsOptions |
|
docs |
ResolvedDocsOptions | false |
|
docsTests |
ResolvedDocsTestOptions |
|
editThisPage |
ResolvedEditThisPageOptions |
|
embeds |
ResolvedBuiltinEmbedOptions |
|
emojiShortcodes |
ResolvedEmojiShortcodeOptions |
|
extensions |
string[] |
|
footnotes |
boolean |
|
frontmatter |
boolean |
|
gfm |
boolean |
|
highlight |
boolean |
|
highlightLangs |
LanguageRegistration[] |
|
highlightTheme |
string | ThemeRegistration |
|
i18n |
ResolvedI18nOptions | false |
|
mermaid |
boolean |
|
ogImage |
boolean |
|
ogImageOptions |
ResolvedOgImageOptions |
|
ogViewer |
boolean |
|
outDir |
string |
|
sanitize |
ResolvedSanitizeOptions |
|
search |
ResolvedSearchOptions |
|
srcDir |
string |
|
ssg |
ResolvedSsgOptions |
|
strikethrough |
boolean |
|
tables |
boolean |
|
taskLists |
boolean |
|
toc |
boolean |
|
tocMaxDepth |
number |
|
transformers |
MarkdownTransformer[] |
|
wikiLinks |
ResolvedWikiLinkOptions |
interfaceResolvedSanitizeOptionsResolved sanitize transform options.
Resolved sanitize transform options.
Signature
export interface ResolvedSanitizeOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
allowedAttributesoptional |
string[] |
|
allowedTagsoptional |
string[] |
|
allowedUrlSchemesoptional |
string[] |
|
enabled |
boolean |
interfaceResolvedSearchOptionsResolved search options.
Resolved search options.
Signature
export interface ResolvedSearchOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
|
hotkey |
string |
|
limit |
number |
|
placeholder |
string |
|
prefix |
boolean |
interfaceResolvedSsgOptionsResolved SSG options.
Resolved SSG options.
Signature
export interface ResolvedSsgOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
bare |
boolean |
|
clean |
boolean |
|
enabled |
boolean |
|
extension |
string |
|
generateOgImage |
boolean |
|
lastUpdated |
boolean |
|
navigationoptional |
SsgNavigationGroup[] |
|
ogImageoptional |
string |
|
siteNameoptional |
string |
|
siteUrloptional |
string |
|
themeoptional |
ResolvedThemeConfig |
interfaceResolvedWikiLinkOptionsResolved wiki-link transform options.
Resolved wiki-link transform options.
Signature
export interface ResolvedWikiLinkOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
baseUrl |
string |
|
enabled |
boolean |
interfaceReturnDocReturn type documentation.
Return type documentation.
Signature
export interface ReturnDoc
Members
Properties
| Name | Type | Description |
|---|---|---|
description |
string |
Prose extracted from @returns / @return documentation. |
type |
string |
Rendered TypeScript type text for the return value. |
interfaceSanitizeOptionsOptions for sanitizing rendered HTML. Sanitization happens after Markdown is re…
Options for sanitizing rendered HTML.
Sanitization happens after Markdown is rendered to HTML. This makes it useful for user-authored content, but consumers should avoid enabling extra tags or schemes unless the rendered output explicitly requires them.
Signature
export interface SanitizeOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
allowedAttributesoptional |
string[] |
Allowed HTML attribute names. Omit to use the built-in safe attribute allow list. Provide a full replacement list, not a list of additions. Default undefined |
allowedTagsoptional |
string[] |
Allowed HTML tag names. Omit to use the built-in safe tag allow list. Provide a full replacement list, not a list of additions. Default undefined |
allowedUrlSchemesoptional |
string[] |
Allowed URL schemes for link-like attributes. Omit to use the built-in safe scheme allow list. Default undefined |
interfaceScopedSearchQueryParsed search query with optional scope prefixes.
Parsed search query with optional scope prefixes.
Signature
export interface ScopedSearchQuery
Members
Properties
| Name | Type | Description |
|---|---|---|
scopes |
string[] |
Deduplicated lowercase scope prefixes requested by the query. |
text |
string |
Query text after @scope prefixes have been removed. |
interfaceSearchDocumentSearch document structure.
Search document structure.
Signature
export interface SearchDocument
Members
Properties
| Name | Type | Description |
|---|---|---|
body |
string |
Plain-text body content used for scoring and snippets. |
code |
string[] |
Code block text extracted from the document. |
headings |
string[] |
Headings extracted from the document. |
id |
string |
Stable document identifier used by the search index. |
title |
string |
Human-readable document title. |
url |
string |
URL returned to search consumers. |
interfaceSearchOptionsOptions for full-text search. Search indexes are built from Markdown content at…
Options for full-text search.
Search indexes are built from Markdown content at build time and loaded by the client runtime from search-index.json. Pass false to the top-level search option to disable both index generation and the virtual search module.
Signature
export interface SearchOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
enabledoptional |
boolean |
Enable search functionality. Set this to false when config merging requires an object shape but searchshould be disabled. Default true |
hotkeyoptional |
string |
Keyboard shortcut to focus search (without modifier). Use an empty string to let the UI opt out of registering a shortcut. Default '/' |
limitoptional |
number |
Maximum number of search results. This controls client-side result truncation, not the number of documents in the generated index. Default 10 |
placeholderoptional |
string |
Placeholder text for the search input. This value is embedded in the virtual search module for UI consumers. Default 'Search documentation...' |
prefixoptional |
boolean |
Enable prefix matching for autocomplete. Prefix matching applies to the final query token, which keeps normal terms precise while still supporting typeahead-style interactions. Default true |
interfaceSearchResultSearch result structure.
Search result structure.
Signature
export interface SearchResult
Members
Properties
| Name | Type | Description |
|---|---|---|
id |
string |
Matching document identifier. |
matches |
string[] |
Query terms that matched the document. |
scopesoptional |
string[] |
Hierarchical scopes derived from the result URL or document id. |
score |
number |
Relevance score returned by the BM25 search engine. |
snippet |
string |
Context snippet with highlighted terms when available. |
title |
string |
Matching document title. |
url |
string |
URL to open when the result is selected. |
interfaceSsgOptionsStatic Site Generation options. These options control the HTML files emitted at…
Static Site Generation options.
These options control the HTML files emitted at build time and the matching dev-server preview behavior. Pass false to the top-level ssg option to disable the whole SSG pipeline, or pass an object to customize the defaults.
Signature
export interface SsgOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
bareoptional |
boolean |
Emit bare HTML with only the rendered Markdown body. This skips the default navigation, layout shell, and theme styles. It is mainly useful for benchmarking, fixture generation, or projects that wrap the output in their own shell. Default false |
cleanoptional |
boolean |
Remove previously generated files from the output directory before writing the new SSG result. Leave this disabled when the output directory also contains assets produced by other Vite plugins or external build steps. Default false |
enabledoptional |
boolean |
Enable the SSG pipeline. Keep this enabled when ox-content owns page rendering. Disable it only when another framework integration will consume the Markdown modules directly. Default true |
extensionoptional |
string |
File extension used for generated routes. The value should include the leading dot. For example, .html emitsguide.html, while an empty string can be used by custom deployments thatmap extensionless output themselves. Default '.html' |
generateOgImageoptional |
boolean |
Generate one Open Graph image per page. Generated images are written alongside the SSG output and referenced from each page's metadata. Configure rendering details with the top-level ogImageOptions option.Default false |
lastUpdatedoptional |
boolean |
Add each page's last git commit timestamp to the default theme. Default false |
navigationoptional |
SsgNavigationGroup[] |
Sidebar navigation override. When omitted, ox-content derives navigation from the Markdown file tree. Provide this when migrating from systems such as VitePress where navigation is intentionally hand-authored. Default undefined |
ogImageoptional |
string |
Static Open Graph image URL used for social sharing. When generateOgImage is enabled, this value is still useful as a fallbackfor pages that cannot produce a generated image. Default undefined |
siteNameoptional |
string |
Site name shown in the default theme header and title suffix. When omitted, the renderer falls back to project metadata where available. Default undefined |
siteUrloptional |
string |
Absolute site URL used when generating social metadata. Set this when pages need absolute Open Graph image URLs. Include the origin and any deployment base path, without a trailing page path. Default undefined |
themeoptional |
ThemeConfig |
Theme configuration for generated pages. Use defineTheme() to build this object so custom theme modules and thedefault theme extension points keep their expected shape. Default defaultTheme |
interfaceThrowsDocException/error documentation.
Exception/error documentation.
Signature
export interface ThrowsDoc
Members
Properties
| Name | Type | Description |
|---|---|---|
description |
string |
Prose extracted from @throws / @exception documentation. |
typeoptional |
string |
Rendered TypeScript type text for the thrown value, when documented. |
interfaceTocEntryTable of contents entry.
Table of contents entry.
Signature
export interface TocEntry
Members
Properties
| Name | Type | Description |
|---|---|---|
children |
TocEntry[] |
Child entries. |
depth |
number |
Heading depth (1-6). |
slug |
string |
Slug/ID for linking. |
text |
string |
Heading text. |
interfaceTransformContextTransform context passed to transformers.
Transform context passed to transformers.
Signature
export interface TransformContext
Members
Properties
| Name | Type | Description |
|---|---|---|
filePath |
string |
File path being processed. |
frontmatter |
Record<string, unknown> |
Frontmatter data. |
options |
ResolvedOptions |
Resolved plugin options. |
interfaceTransformResultTransform result.
Transform result.
Signature
export interface TransformResult
Members
Properties
| Name | Type | Description |
|---|---|---|
code |
string |
Generated JavaScript code. |
frontmatter |
Record<string, unknown> |
Parsed frontmatter. |
html |
string |
Rendered HTML. |
mapoptional |
null |
Source map (null means no source map). |
toc |
TocEntry[] |
Table of contents. |
moduletypesType definitions for @ox-content/vite-plugin
Type definitions for @ox-content/vite-plugin
interfaceWikiLinkOptionsOptions for expanding Obsidian-style wiki links. The transform accepts [target]…
Options for expanding Obsidian-style wiki links.
The transform accepts [[target]] and [[target|label]] syntax and rewrites it to regular links before rendering. It is intentionally small: path resolution is based on the configured base URL rather than a full backlink graph.
Signature
export interface WikiLinkOptions
Members
Properties
| Name | Type | Description |
|---|---|---|
baseUrloptional |
string |
Base URL prepended to resolved wiki-link targets. When omitted, the top-level base option is used.Default options.base |