API Documentation
Generated by Ox Content
Use search scopes like
@api transformto limit results to the generated API reference.
Modules
browser 2 symbols
- interface
OgBrowserSession extends AsyncDisposableA browser session that can render HTML pages to PNG. Implements AsyncDisposable for aut… - fn
openBrowser(): Promise<OgBrowserSession | null>Opens a Chromium browser and returns a session for rendering OG images. Returns null if…
cache 3 symbols
- fn
computeCacheKey(templateSource: string, props: Record<string, unknown>, width: number, height: number): stringComputes a cache key from template + props + options. - fn
getCached(cacheDir: string, key: string): Promise<Buffer | null>Checks if a cached PNG exists for the given key. Returns the cached file path if found,… - fn
writeCache(cacheDir: string, key: string, png: Buffer): Promise<void>Writes a PNG buffer to the cache.
dev-server 10 symbols
- fn
createDevServerCache(): DevServerCacheCreate a dev server cache instance. - fn
createDevServerMiddleware(options: ResolvedOptions, root: string, cache: DevServerCache): Connect.NextHandleFunctionCreate the dev server middleware for SSG page serving. - interface
DevServerCacheDev server state for caching. - fn
injectViteHmrClient(html: string): stringInject Vite HMR client script into the HTML. - fn
invalidateNavCache(cache: DevServerCache): voidInvalidate navigation cache (called on file add/unlink). - fn
invalidatePageCache(cache: DevServerCache, filePath: string): voidInvalidate page cache for a specific file (called on file change). - fn
renderPage(filePath: string, options: ResolvedOptions, navGroups: NavGroup[], siteName: string, base: string, root: string): Promise<string>Render a single markdown page to full HTML. - fn
resolveMarkdownFile(url: string, srcDir: string): Promise<string | null>Resolve a request URL to a markdown file path. Returns null if no matching file exists. - fn
resolveSiteName(options: ResolvedOptions, root: string): Promise<string>Resolve site name from options or package.json. - fn
shouldSkip(url: string): booleanCheck if a request URL should be skipped by the dev server middleware.
docs 8 symbols
- fn
buildSymbolMap(docs: ExtractedDocs[]): Map<string, SymbolLocation>Builds a map of all symbols to their file locations. - fn
convertSymbolLinks(text: string, currentFileName: string, symbolMap: Map<string, SymbolLocation>): stringConverts symbol links [SymbolName] to markdown links. Processes description text to con… - fn
extractDocs(srcDirs: string[], options: ResolvedDocsOptions): Promise<ExtractedDocs[]>Extracts JSDoc documentation from source files in specified directories. This function… - fn
findFiles(dir: string, options: ResolvedDocsOptions): Promise<string[]>Recursively finds all source files matching include/exclude patterns. - fn
generateMarkdown(docs: ExtractedDocs[], options: ResolvedDocsOptions): Record<string, string>Generates Markdown documentation from extracted docs. - fn
generateSourceHref(filePath: string, githubUrl: string, lineNumber?: number, endLineNumber?: number): stringGenerates a GitHub source link for a file and optional line range. - interface
SymbolLocationSymbol location info for cross-file linking. - fn
writeDocs(docs: Record<string, string>, outDir: string, extractedDocs?: ExtractedDocs[], options?: ResolvedDocsOptions): Promise<void>Writes generated documentation to the output directory.
environment 5 symbols
- fn
createEnvironmentPlugins(_options: ResolvedOptions)Environment plugin factory. Creates plugins specific to the Markdown environment. - fn
createMarkdownEnvironment(options: ResolvedOptions): EnvironmentOptionsCreates the Markdown processing environment configuration. This environment is used for… - fn
createTransformOptions(ctx: EnvironmentTransformContext, options: ResolvedOptions): ResolvedOptionsCreates environment-aware transform options. - interface
EnvironmentTransformContextEnvironment-specific module transformer. This is called during the transform phase to p… - fn
prerender(files: string[], _options: ResolvedOptions): Promise<Map<string, string>>Runs pre-render for SSG. This function is called during build to pre-render all Markdow…
github 9 symbols
- fn
collectGitHubRepos(html: string): Promise<string[]>Collect all GitHub repos from HTML for pre-fetching. - fn
createFallbackCard(repo: string): ElementCreate fallback element when repo data is unavailable. - fn
createGitHubCard(repoData: GitHubRepoData): ElementCreate GitHub card element from repo data. - fn
fetchRepoData(repo: string, options: Required<GitHubOptions>): Promise<GitHubRepoData | null>Fetch repository data from GitHub API. - fn
formatNumber(num: number): stringFormat number with K/M suffix. - fn
getAttribute(el: Element, name: string): string | undefinedGet element attribute value. - fn
prefetchGitHubRepos(repos: string[], options?: GitHubOptions): Promise<Map<string, GitHubRepoData | null>>Pre-fetch all GitHub repos data. - fn
rehypeGitHub(repoDataMap: Map<string, GitHubRepoData | null>)Rehype plugin to transform GitHub components. - fn
transformGitHub(html: string, repoDataMap?: Map<string, GitHubRepoData | null>, options?: GitHubOptions): Promise<string>Transform GitHub components in HTML.
highlight 4 symbols
- fn
getHighlighter(theme: string | ThemeRegistration, customLangs: LanguageRegistration[] = []): Promise<Highlighter>Get or create the Shiki highlighter. - fn
getTextContent(node: Element | Root): stringExtract text content from a hast node. - fn
highlightCode(html: string, theme: string | ThemeRegistration = "github-dark", langs: LanguageRegistration[] = []): Promise<string>Apply syntax highlighting to HTML using Shiki. - fn
rehypeShikiHighlight(options: { theme: string | ThemeRegistration; langs?: LanguageRegistration[]; })Rehype plugin for syntax highlighting with Shiki.
i18n 7 symbols
- fn
collectKeysFromSource(root: string, extractTranslationKeys: ( source: string, filePath: string, functionNames?: string[], ) => Array<{ key: string }>, options: ResolvedI18nOptions): string[]Collects translation keys from source files using NAPI extractTranslationKeys. - fn
createI18nPlugin(resolvedOptions: ResolvedOptions): PluginCreates the i18n sub-plugin for the Vite plugin array. - fn
flattenObject(obj: Record<string, unknown>, prefix: string, result: Record<string, string>): voidFlattens a nested object into dot-separated keys. - fn
generateI18nModule(options: ResolvedI18nOptions, root: string): stringGenerates the virtual module for i18n configuration. - fn
loadDictionariesFallback(options: ResolvedI18nOptions, dictDir: string): Record<string, Record<string, string>>Fallback dictionary loading using TS-based JSON file reading. - fn
resolveI18nOptions(options: I18nOptions | false | undefined): ResolvedI18nOptions | falseResolves i18n options with defaults. - fn
walkDir(dir: string, pattern: RegExp, callback: (filePath: string) => void): voidRecursively walks a directory, calling the callback for files matching the pattern.
index 3 symbols
- fn
generateVirtualModule(path: string, options: ResolvedOptions): stringGenerates virtual module content. - fn
oxContent(options: OxContentOptions = {}): Plugin[]Creates the Ox Content Vite plugin. - fn
resolveOptions(options: OxContentOptions): ResolvedOptionsResolves plugin options with defaults.
index 15 symbols
- fn
computeTemplateSource(options: ResolvedOgImageOptions, root: string): Promise<string>Computes a stable template source identifier for cache keys. For custom templates, hash… - fn
createSvelteCompilerPlugin(): import("rolldown").PluginCreates a rolldown plugin that compiles Svelte SFCs using svelte/compiler. - fn
createVueCompilerPlugin(): import("rolldown").PluginCreates a rolldown plugin that compiles Vue SFCs using @vue/compiler-sfc. - fn
generateOgImages(pages: OgImagePageEntry[], options: ResolvedOgImageOptions, root: string): Promise<OgImageResult[]>Generates OG images for a batch of pages. Manages the full lifecycle: resolve template… - fn
getVizejsPlugin(): Promise<import("rolldown").Plugin[]>Loads @vizejs/vite-plugin as a rolldown plugin for Vue SFC compilation. - interface
OgImagePageEntryA single page entry for batch OG image generation. - interface
OgImageResultResult of OG image generation for a single page. - fn
- fn
resolveOgImageOptions(options: OgImageOptions | undefined): ResolvedOgImageOptionsResolves user-provided OG image options with defaults. - fn
resolveReactTemplate(templatePath: string, root: string): Promise<OgImageTemplateFn>Resolves a React (.tsx/.jsx) template via SSR. Bundles with rolldown (JSX transform), t… - fn
resolveSvelteTemplate(templatePath: string, root: string): Promise<OgImageTemplateFn>Resolves a Svelte SFC template via SSR. Compiles the SFC with svelte/compiler (server m… - fn
resolveTemplate(options: ResolvedOgImageOptions, root: string): Promise<OgImageTemplateFn>Resolves the template function from options. Dispatches by file extension: -.vue→ V… - fn
resolveTsTemplate(templatePath: string, options: ResolvedOgImageOptions, root: string): Promise<OgImageTemplateFn>Resolves a plain TypeScript template (existing behavior). - fn
resolveVueTemplate(templatePath: string, options: ResolvedOgImageOptions, root: string): Promise<OgImageTemplateFn>Resolves a Vue SFC template via SSR. Compiles the SFC with @vue/compiler-sfc (or @vizej… - fn
tryServeAllFromCache(pages: OgImagePageEntry[], templateSource: string, options: ResolvedOgImageOptions, cacheDir: string): Promise<OgImageResult[] | null>Tries to serve all pages from cache. Returns results if ALL pages are cached, null othe…
index 2 symbols
- interface
TransformAllOptionsTransform all plugin components in HTML. Call this during SSG build to process all plug… - fn
transformAllPlugins(html: string, options: TransformAllOptions = {}): Promise<string>Transform all enabled plugins in HTML content.
jsx-runtime 15 symbols
- fn
each<T>(items: T[], render: (item: T, index: number) => JSXNode): JSXNodeMaps over an array and renders each item. - fn
escapeHtml(str: string): stringEscapes HTML special characters to prevent XSS. - fn
Fragment({ children }: { children?: JSXChild }): JSXNodeFragment component - renders children without a wrapper element. - fn
jsx(type: JSXElementType, props: JSXProps, _key?: string): JSXNodeCreates a JSX element. This is the core function called by the JSX transform. - type
JSXChild = string | number | boolean | null | undefined | JSXNode | JSXChild[]Valid JSX child types. - type
JSXElementType = string | ((props: Record<string, unknown>) => JSXNode)JSX element type - either a string (intrinsic) or a function component. - interface
JSXNodeJSX node - the result of JSX expressions. - interface
JSXPropsProps with children. - fn
jsxs(type: JSXElementType, props: JSXProps, key?: string): JSXNodeCreates a JSX element with static children. Called by the JSX transform for elements wi… - fn
raw(html: string): JSXNodeCreates raw HTML without escaping. Use with caution - only for trusted content. - fn
renderAttr(name: string, value: unknown): stringRenders an attribute value to a string. - fn
renderChildren(children: JSXChild): stringRenders children to HTML string. - fn
renderToString(node: JSXNode): stringRenders a JSX node to an HTML string. - fn
toHtmlAttr(name: string): stringConverts a camelCase attribute name to kebab-case for HTML. Special handling for data-*… - fn
when(condition: boolean, content: JSXNode): JSXNodeConditionally renders content.
lint-files 7 symbols
- fn
lintMarkdownFile(filePath: string, options: MarkdownLintFileOptions = {}): Promise<MarkdownLintFileResult>Lints a single Markdown file using project-style include/exclude settings. If the file… - fn
lintMarkdownFiles(options: MarkdownLintFileOptions = {}): Promise<MarkdownLintFilesResult>Lints all Markdown files matched by the configured include/exclude patterns. - interface
MarkdownLintFileDiagnostic extends MarkdownLintDiagnosticA lint diagnostic annotated with file metadata. - interface
MarkdownLintFileOptions extends MarkdownLintOptionsFile-oriented Markdown lint options for end-user configuration. This extends the conten… - interface
MarkdownLintFileResult extends MarkdownLintResultLint result for a single file. - interface
MarkdownLintFilesResultAggregated lint result for multiple files. - fn
shouldLintMarkdownFile(filePath: string, options: MarkdownLintFileOptions = {}): booleanReturns true if the file path is included by the configured glob filters.
lint 9 symbols
- fn
lintMarkdown(source: string, options: MarkdownLintOptions = {}): MarkdownLintResultLints Markdown prose with the Rust-backed built-in rule engine. - fn
lintMarkdownAsync(source: string, options: MarkdownLintOptions = {}): Promise<MarkdownLintResult>Async Markdown linter that supports opt-in standard dictionaries. - fn
lintMarkdownDocumentsAsync(sources: string[], options: MarkdownLintOptions = {}): Promise<MarkdownLintResult[]>Internal batched Markdown linting entry point used by file-based workflows. - interface
MarkdownLintDiagnosticA single Markdown lint diagnostic. - interface
MarkdownLintDictionaryOptionsAdditional dictionary configuration for the Markdown linter. - interface
MarkdownLintOptionsOptions for linting Markdown documents. - interface
MarkdownLintResultMarkdown lint report. - interface
MarkdownLintRuleOptionsRule switches for Markdown linting. - interface
MarkdownLintStandardDictionaryOptionsOpt-in standard dictionary sources. The default provider uses CSpell dictionary package…
mermaid-protect 3 symbols
- interface
MermaidSvgProtectionProtects mermaid SVG content from rehype HTML5 parser corruption. rehypeParse + rehypeS… - fn
protectMermaidSvgs(html: string): MermaidSvgProtectionExtract<div class="ox-mermaid">...</div>blocks and replace with HTML comment placeh… - fn
restoreMermaidSvgs(html: string, svgs: Map<string, string>): stringRestore protected mermaid SVG blocks from placeholders.
mermaid 1 symbol
- fn
transformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>Transforms mermaid code blocks in HTML to rendered SVG diagrams. Uses the native Rust N…
nav-generator 4 symbols
- fn
generateNavCode(navItems: NavItem[], exportName: string = "apiNav"): stringGenerates TypeScript code for navigation metadata export. Creates a complete, self-cont… - fn
generateNavMetadata(docs: ExtractedDocs[], basePath: string = "/api"): NavItem[]Generates sidebar navigation metadata from extracted documentation. Takes an array of e… - fn
getDocDisplayName(filePath: string): stringGets the human-readable display name for a documentation file. Transforms file paths an… - fn
getDocFileName(filePath: string): stringGets the file name (without extension) for use in navigation paths. This handles filena…
ogp 11 symbols
- fn
collectOgpUrls(html: string): Promise<string[]>Collect all OGP URLs from HTML for pre-fetching. - fn
createFallbackCard(url: string): ElementCreate fallback element when OGP data is unavailable. - fn
createOgpCard(data: OgpData): ElementCreate OGP card element. - fn
extractDomain(url: string): stringExtract domain from URL. - fn
fetchOgpData(url: string, options: Required<OgpOptions>): Promise<OgpData | null>Fetch OGP data for a URL. - fn
getAttribute(el: Element, name: string): string | undefinedGet element attribute value. - fn
getFaviconUrl(url: string): stringGet favicon URL for a domain. - fn
parseOgpFromHtml(html: string, url: string): OgpDataParse OGP metadata from HTML. - fn
prefetchOgpData(urls: string[], options?: OgpOptions): Promise<Map<string, OgpData | null>>Pre-fetch all OGP data. - fn
rehypeOgp(ogpDataMap: Map<string, OgpData | null>)Rehype plugin to transform OgCard components. - fn
transformOgp(html: string, ogpDataMap?: Map<string, OgpData | null>, options?: OgpOptions): Promise<string>Transform OgCard components in HTML.
page-context 16 symbols
- interface
BasePagePropsBase page props available for all pages. - fn
clearRenderContext(): voidClears the current render context. Called internally after page rendering. - interface
FrontmatterSchemaSchema for frontmatter type generation. - fn
generateFrontmatterTypes(samples: Record<string, unknown>[], interfaceName = "PageFrontmatter"): stringGenerates TypeScript interface from frontmatter samples. - fn
inferType(value: unknown): stringInfers TypeScript types from frontmatter values. - interface
NavGroupNavigation group. - interface
NavItemNavigation item. - type
PageProps<T extends Record<string, unknown> = Record<string, unknown>> = BasePageProps & { /** Custom frontmatter fields */ frontmatter: T & Record<string, unknown>; }Extended page props with custom frontmatter. - interface
RenderContext<T extends Record<string, unknown> = Record<string, unknown>>Complete render context. - fn
setRenderContext(ctx: RenderContext): voidSets the current render context. Called internally during page rendering. - interface
SiteConfigSite-wide configuration available in context. - fn
useIsActive(path: string): booleanChecks if the given path is the current page. - fn
useNav(): NavGroup[]Gets the navigation groups. - fn
usePageProps< T extends Record<string, unknown> = Record<string, unknown>, >(): PageProps<T>Gets the current page props. - fn
useRenderContext< T extends Record<string, unknown> = Record<string, unknown>, >(): RenderContext<T>Gets the full render context. - fn
useSiteConfig(): SiteConfigGets the site configuration.
parse 10 symbols
- fn
extractIslandInfo(html: string): Promise<IslandInfo[]>Extract island info without transforming HTML. Useful for analysis/bundling purposes. - fn
findComponentElement(children: Element["children"]): Element | nullFind the component element inside <Island>. - fn
generateHydrationScript(components: string[]): stringGenerate client-side hydration script. This is a minimal script that imports and initia… - fn
getAttribute(el: Element, name: string): string | undefinedGet element attribute value. - fn
getComponentName(el: Element): stringGet component name from child element. - fn
hasIslands(html: string): booleanCheck if HTML contains any Island components. - fn
parseProps(el: Element): Record<string, unknown>Parse JSX-style props from attributes. - fn
rehypeIslands(collectedIslands: IslandInfo[])Rehype plugin to transform Island components. - fn
resetIslandCounter(): voidReset island counter (for testing). - fn
transformIslands(html: string): Promise<ParseIslandsResult>Transform Island components in HTML. Converts: ```html <Island load="visible"> <Counter…
renderer 2 symbols
- fn
renderHtmlToPng(page: Page, html: string, width: number, height: number, publicDir?: string): Promise<Buffer>Renders an HTML string to a PNG buffer using Chromium. - fn
wrapHtml(bodyHtml: string, width: number, height: number, useBaseUrl: boolean): stringWraps template HTML in a minimal document with viewport locked to given dimensions.
search 8 symbols
- fn
buildSearchIndex(srcDir: string, base: string): Promise<string>Builds the search index from Markdown files. - fn
collectMarkdownFiles(dir: string): Promise<string[]>Collects all Markdown files from a directory. - fn
generateSearchModule(options: ResolvedSearchOptions, indexPath: string): stringClient-side search module code. This is injected into the bundle as a virtual module. - fn
getSearchDocumentScopes(doc: Pick<SearchDocument, "id" | "url">): string[]Derives hierarchical search scopes from a document id or URL. For example, `api/math/in… - fn
matchesSearchScopes(doc: Pick<SearchDocument, "id" | "url">, scopes: string[]): booleanReturns true when a search document belongs to at least one requested scope. - fn
parseScopedSearchQuery(query: string): ScopedSearchQuerySplits a raw query into free-text terms and@scopeprefixes. - fn
resolveSearchOptions(options: SearchOptions | boolean | undefined): ResolvedSearchOptionsResolves search options with defaults. - fn
writeSearchIndex(indexJson: string, outDir: string): Promise<void>Writes the search index to a file.
ssg 21 symbols
- fn
_generateNavHtml(navGroups: NavGroup[], currentPath: string): stringGenerates navigation HTML from nav groups. - fn
_generateTocHtml(toc: TocEntry[]): stringGenerates TOC HTML from toc entries. - fn
buildNavItems(markdownFiles: string[], srcDir: string, base: string, extension: string): NavGroup[]Builds navigation items from markdown files, grouped by directory. - fn
buildSsg(options: ResolvedOptions, root: string): Promise<{ files: string[]; errors: string[] }>Builds all markdown files to static HTML. - fn
collectMarkdownFiles(srcDir: string): Promise<string[]>Collects all markdown files from the source directory. - fn
extractTitle(content: string, frontmatter: Record<string, unknown>): stringExtracts title from content or frontmatter. - fn
formatTitle(name: string): stringFormats a file/dir name as a title. - fn
generateBareHtmlPage(content: string, title: string): stringGenerates bare HTML page (no navigation, no styles). - fn
generateHtmlPage(pageData: SsgPageData, navGroups: NavGroup[], siteName: string, base: string, ogImage?: string, theme?: ResolvedThemeConfig): Promise<string>Generates HTML page with navigation using Rust NAPI bindings. - fn
getDisplayTitle(filePath: string): stringGets display title from file path. - fn
getHref(inputPath: string, srcDir: string, base: string, extension: string): stringConverts a markdown file path to an href. - fn
getOgImagePath(inputPath: string, srcDir: string, outDir: string): stringGets the OG image output path for a given markdown file. - fn
getOgImageUrl(inputPath: string, srcDir: string, base: string, siteUrl?: string): stringGets the OG image URL for use in meta tags. If siteUrl is provided, returns an absolute… - fn
getOutputPath(inputPath: string, srcDir: string, outDir: string, extension: string): stringConverts a markdown file path to its corresponding HTML output path. - fn
getUrlPath(inputPath: string, srcDir: string): stringConverts a markdown file path to a relative URL path. - interface
NavGroupNavigation group for hierarchical navigation. - fn
renderTemplate(template: string, data: Record<string, unknown>): stringSimple mustache-like template rendering. - fn
resolveSsgOptions(ssg: SsgOptions | boolean | undefined): ResolvedSsgOptionsResolves SSG options with defaults. - interface
SsgEntryPageConfigEntry page configuration for SSG (passed to Rust). - interface
SsgNavItemNavigation item for SSG. - interface
SsgPageDataPage data for SSG.
tabs 8 symbols
- fn
createFallbackElement(tabs: TabData[]): ElementCreate fallback HTML using <details> elements. - fn
createTabsElement(tabs: TabData[], groupId: string): ElementCreate the HTML structure for tabs. - fn
generateTabsCSS(groupCount: number): stringGenerate dynamic CSS for :has() based tab switching. This is needed because :has() sele… - fn
getAttribute(el: Element, name: string): string | undefinedGet element attribute value. - fn
parseTabChildren(children: Element["children"]): TabData[]Parse Tab elements from Tabs children. - fn
rehypeTabs()Rehype plugin to transform Tabs components. - fn
resetTabGroupCounter(): voidReset tab group counter (for testing). - fn
transformTabs(html: string): Promise<string>Transform Tabs components in HTML.
template 2 symbols
- fn
escapeHtml(str: string): stringEscapes HTML special characters. - fn
getDefaultTemplate(): OgImageTemplateFnReturns the built-in default template function.
theme-renderer 9 symbols
- fn
createTheme(config: { layouts: Record<string, ThemeComponent>; defaultLayout?: string; }): ThemeComponentCreates a theme with layout switching support. - fn
DefaultTheme({ children }: ThemeProps): JSXNodeDefault theme component. A minimal theme that renders page content with basic styling. - fn
generateTypes(pages: PageData[], outDir: string): Promise<void>Generates TypeScript type definitions from page frontmatter. - interface
PageDataPage data for rendering. - fn
renderAllPages(pages: PageData[], options: ThemeRenderOptions): Promise<Map<string, string>>Renders all pages and generates type definitions. - fn
renderPage(page: PageData, options: ThemeRenderOptions): stringRenders a page using the theme component. - type
ThemeComponent = (props: ThemeProps) => JSXNodeTheme component type. - interface
ThemePropsProps passed to the theme component. - interface
ThemeRenderOptionsTheme render options.
theme 24 symbols
- fn
deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): TDeep merge two objects. - fn
defineTheme(config: ThemeConfig): ThemeConfigDefines a theme configuration with type checking. - fn
mergeThemes(...themes): ThemeConfigMerges multiple theme configurations. Later themes override earlier ones. - interface
NapiSocialLinksNAPI-compatible social links type. - interface
NapiThemeColorsNAPI-compatible theme colors type. - interface
NapiThemeConfigNAPI-compatible theme configuration type. - interface
NapiThemeEmbedNAPI-compatible theme embed type. - interface
NapiThemeEntryPageNAPI-compatible entry page theme type. - interface
NapiThemeFontsNAPI-compatible theme fonts type. - interface
NapiThemeFooterNAPI-compatible theme footer type. - interface
NapiThemeHeaderNAPI-compatible theme header type. - interface
NapiThemeLayoutNAPI-compatible theme layout type. - interface
ResolvedThemeConfigResolved theme configuration (after merging with defaults). - fn
resolveTheme(config?: ThemeConfig): ResolvedThemeConfigResolves a theme configuration by merging with its extends chain and defaults. - interface
SocialLinksSocial links configuration. - interface
ThemeColorsTheme color configuration. - interface
ThemeConfigComplete theme configuration. - interface
ThemeEmbedEmbedded HTML content for specific positions in the page layout. - interface
ThemeEntryPageEntry page theme configuration. - interface
ThemeFontsTheme font configuration. - interface
ThemeFooterTheme footer configuration. - interface
ThemeHeaderTheme header configuration. - interface
ThemeLayoutTheme layout configuration. - fn
themeToNapi(theme: ResolvedThemeConfig): NapiThemeConfigConverts resolved theme to the format expected by Rust NAPI.
transform 11 symbols
- fn
buildTocTree(entries: TocEntry[]): TocEntry[]Builds nested TOC tree from flat list. - fn
extractImports(content: string): string[]Extracts imports from Markdown content. Supports importing components for interactive i… - fn
generateModuleCode(html: string, frontmatter: Record<string, unknown>, toc: TocEntry[], filePath: string, _options: ResolvedOptions): stringGenerates the JavaScript module code. - fn
generateOgImageSvg(data: OgImageData, config?: OgImageConfig): Promise<string | null>Generates an OG image SVG using the Rust-based generator. This function uses the Rust N… - interface
JsTransformOptionsOptions for Rust-based Markdown transformation. Controls which Markdown extensions and… - fn
loadNapiBindings(): Promise<NapiBindings | null>Lazily loads and caches NAPI bindings. This function uses lazy loading to defer the imp… - interface
NapiBindingsNAPI bindings for Rust-based Markdown processing. Provides access to compiled Rust func… - interface
OgImageConfigOG image configuration. - interface
OgImageDataOG image data for generating social media preview images. - fn
parseFrontmatter(source: string): { content: string; frontmatter: Record<string, unknown>; }Parses YAML frontmatter from Markdown content. Uses proper YAML parser for full nested… - interface
SsgTransformOptionsSSG-specific transform options.
types 4 symbols
- interface
OgImageOptionsOG image generation options (user-facing). - type
OgImageTemplateFn = (props: OgImageTemplateProps) => string | Promise<string>Template function that receives page metadata and returns an HTML string. - interface
OgImageTemplatePropsProps passed to OG image template functions. - interface
ResolvedOgImageOptionsResolved OG image options with all defaults applied.
types 37 symbols
- type
CodeAnnotationKind = "highlight" | "warning" | "error"Supported line annotation kinds for code blocks. - interface
CodeAnnotationsOptionsOpt-in code annotation configuration. - type
CodeAnnotationSyntax = "attribute" | "vitepress" | "both"Supported code annotation syntaxes. - interface
DocEntryA single documentation entry extracted from source. - interface
DocsOptionsOptions for source documentation generation. - interface
EntryPageConfigEntry page frontmatter configuration. - interface
ExtractedDocsExtracted documentation for a single file. - interface
FeatureConfigFeature card for entry page. - interface
GeneratedDocsDataMachine-readable payload emitted alongside generated docs. - interface
HeroActionHero section action button. - interface
HeroConfigHero section configuration for entry page. - interface
HeroImageHero section image configuration. - interface
HeroNoticeHero notice configuration. - interface
I18nOptionsi18n (internationalization) options. - interface
LocaleConfigLocale configuration. - interface
MarkdownNodeMarkdown AST node (simplified for TypeScript). - interface
MarkdownTransformerCustom AST transformer. - interface
NavItemNavigation item for sidebar navigation. - interface
OgImageOptionsOG image generation options. Uses Chromium-based rendering with customizable templates. - interface
OxContentOptionsPlugin options. - interface
ParamDocParameter documentation. - interface
ResolvedCodeAnnotationsOptionsResolved code annotation configuration. - interface
ResolvedDocsOptionsResolved docs options with all defaults applied. - interface
ResolvedI18nOptionsResolved i18n options with all defaults applied. - interface
ResolvedOgImageOptionsResolved OG image options with all defaults applied. - interface
ResolvedOptionsResolved options with all defaults applied. - interface
ResolvedSearchOptionsResolved search options. - interface
ResolvedSsgOptionsResolved SSG options. - interface
ReturnDocReturn type documentation. - interface
ScopedSearchQueryParsed search query with optional scope prefixes. - interface
SearchDocumentSearch document structure. - interface
SearchOptionsOptions for full-text search. - interface
SearchResultSearch result structure. - interface
SsgOptionsSSG (Static Site Generation) options. - interface
TocEntryTable of contents entry. - interface
TransformContextTransform context passed to transformers. - interface
TransformResultTransform result.
youtube 6 symbols
- fn
buildEmbedUrl(videoId: string, options: Required<YouTubeOptions>, params?: Record<string, string>): stringBuild YouTube embed URL with parameters. - fn
createYouTubeElement(videoId: string, options: Required<YouTubeOptions>, title?: string, start?: string): ElementCreate YouTube embed element. - fn
extractVideoId(input: string): string | nullExtract YouTube video ID from various URL formats. - fn
getAttribute(el: Element, name: string): string | undefinedGet element attribute value. - fn
rehypeYouTube(options: Required<YouTubeOptions>)Rehype plugin to transform YouTube components. - fn
transformYouTube(html: string, options?: YouTubeOptions): Promise<string>Transform YouTube components in HTML.