API Documentation
Generated by Ox Content
Use search scopes like
@api transformto limit results to the generated API reference.
41
modules
341
symbols
157
functions
130
interfaces
12
types
10
variables
32
modules
290
parameters
743
members
154
returns
19
examples
2
deprecated
Modules
api 4 symbols
- fn
fetchGitHubSource(source: GitHubSourceRef, options: Required<GitHubOptions>): Promise<GitHubSourceData | null>Fetch source file data from GitHub API. - fn
fetchRepoData(repo: string, options: Required<GitHubOptions>): Promise<GitHubRepoData | null>Fetch repository data from GitHub API. - fn
prefetchGitHubRepos(repos: string[], options?: GitHubOptions): Promise<Map<string, GitHubRepoData | null>>Pre-fetch all GitHub repos data. - fn
prefetchGitHubSources(sources: GitHubSourceRef[], options?: GitHubOptions): Promise<Map<string, GitHubSourceData | null>>Pre-fetch all GitHub source files.
attributes 2 symbols
- fn
collectGitHubRepos(html: string): Promise<string[]>Collect all GitHub repos from HTML for pre-fetching. - fn
collectGitHubSources(html: string): Promise<GitHubSourceRef[]>Collect all GitHub source references from HTML for pre-fetching.
browser 3 symbols
- module
browserChromium browser session with automatic cleanup via Explicit Resource Management. Usage… - 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 4 symbols
- module
cacheContent-hash based caching for OG images. Uses SHA256 of (template source + props + opt… - 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 13 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. - module
dev-serverDev server middleware for ox-content SSG. Serves fully-rendered HTML pages (with naviga… - 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, extensions: readonly 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. - variable
- variable
const VITE_INTERNAL_PREFIXES = ["/@vite/", "/@fs/", "/@id/", "/__"]Vite internal URL prefixes to skip.
docs 5 symbols
- module
docsSource Documentation Extraction and Generation This module provides comprehensive tools… - fn
extractDocs(srcDirs: string[], options: ResolvedDocsOptions): Promise<ExtractedDocs[]>Extracts JSDoc documentation from source files in specified directories. This function… - fn
generateMarkdown(docs: ExtractedDocs[], options: ResolvedDocsOptions): Record<string, string>Generates Markdown documentation from extracted docs. - fn
resolveDocsOptions(options: false): falseResolves docs options with defaults. - fn
writeDocs(docs: Record<string, string>, outDir: string, extractedDocs?: ExtractedDocs[], options?: ResolvedDocsOptions): Promise<void>Writes generated documentation to the output directory.
environment 6 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. - module
environmentVite Environment API integration for Ox Content. Creates a dedicated environment for Ma… - 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…
fallback-card 1 symbol
- fn
createFallbackCard(repo: string): ElementCreate fallback element when repo data is unavailable.
highlight 5 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. - module
highlightSyntax highlighting with Shiki via rehype. - 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 4 symbols
- fn
createI18nPlugin(resolvedOptions: ResolvedOptions): PluginCreates the i18n sub-plugin for the Vite plugin array. - fn
generateI18nModule(options: ResolvedI18nOptions, root: string): stringGenerates the virtual module for i18n configuration. - module
i18ni18n plugin for Ox Content. Provides: - Dictionary loading and validation at build time… - fn
resolveI18nOptions(options: I18nOptions | false | undefined): ResolvedI18nOptions | falseResolves i18n options with defaults.
index 4 symbols
- fn
generateVirtualModule(path: string, options: ResolvedOptions): stringGenerates virtual module content. - module
indexVite Plugin for Ox Content Uses Vite's Environment API for SSG-focused Markdown process… - fn
oxContent(options: OxContentOptions = {}): Plugin[]Creates the Ox Content Vite plugin. - fn
resolveOptions(options: OxContentOptions): ResolvedOptionsResolves plugin options with defaults.
index 1 symbol
- module
indexIsland Architecture support for ox-content Provides parsing and transformation of <Isla…
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 → Vue… - 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 5 symbols
- module
indexox-content Built-in Plugins All plugins are designed with No-JavaScript-First principle… - fn
normalizeSelfClosingEmbeds(html: string): stringCustom embed tags are not HTML void elements, so a self-closing authoring form like <Gi… - 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. - fn
transformBuiltinEmbeds(html: string, options: { github: GitHubOptions | false; openGraph: OgpOptions | false; pm?: PmOptions | false; spotify?: boolean; stackBlitz?: boolean; twitter?: boolean | TwitterEmbedOptions; bluesky?: boolean; webContainer?: boolean; }): Promise<string>Transform built-in embed components in HTML content.
interop 2 symbols
- module
interopInterop helpers for loading ESM-only dependencies from the CommonJS build. - fn
interopDefault<T>(value: T): TUnwrap the default export of an ESM-only dependency. The CommonJS build (dist/index.cjs…
jsx-runtime 17 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. - module
jsx-runtimeCustom JSX Runtime for Static HTML Generation This module provides a JSX runtime that o… - 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-*… - variable
const VOID_ELEMENTS = new Set([ "area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr", ])Custom JSX Runtime for Static HTML Generation This module provides a JSX runtime that o… - fn
when(condition: boolean, content: JSXNode): JSXNodeConditionally renders content.
jsx.d 1 symbol
- module
jsx.dJSX Type Definitions for Static HTML Generation These types enable TypeScript support f…
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 4 symbols
- module
mermaid-protectProtects mermaid SVG content from rehype HTML5 parser corruption. rehypeParse + rehypeS… - 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 placehol… - fn
restoreMermaidSvgs(html: string, svgs: Map<string, string>): stringRestore protected mermaid SVG blocks from placeholders.
mermaid 4 symbols
- module
mermaidMermaid Plugin - Native Rust renderer via NAPI Renders mermaid code blocks to SVG using… - variable
- variable
- fn
transformMermaidStatic(html: string, _options?: MermaidOptions): Promise<string>Transforms mermaid code blocks in HTML to rendered SVG diagrams. Uses the native Rust N…
og-viewer 1 symbol
- module
og-viewerOG Viewer - Dev tool for previewing Open Graph metadata Accessible at /__og-viewer duri…
ogp 12 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. - module
ogpOGP Card Plugin - Link card embedding Transforms <OgCard> components into static link p… - 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.
optional-deps.d 1 symbol
- module
optional-deps.dAmbient module declarations for optional dependencies. These packages are dynamically i…
page-context 15 symbols
- interface
BasePagePropsBase page props available for all pages. - 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. - module
page-contextPage Context for Static HTML Generation Provides a way to access page props (frontmatte… - type
PageProps<T extends Record<string, unknown> = Record<string, unknown>> = BasePageProps & { frontmatter: T & Record<string, unknown> }Extended page props with custom frontmatter. - interface
RenderContext<T extends Record<string, unknown> = Record<string, unknown>>Complete render context. - 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 11 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. - module
parseIsland Parser Detects <Island> components in HTML and transforms them into hydration-re… - 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…
pm 3 symbols
- module
pmPackage Manager Tabs Plugin Transforms <pm>npm install …</pm> blocks into a tab group w… - interface
PmOptionsOptions for transformPm. - fn
transformPm(html: string, options?: PmOptions): Promise<string>Transform <pm> package-manager blocks in HTML into install tabs.
renderer 3 symbols
- module
rendererHTML → PNG renderer using Chromium screenshots via Playwright. - 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.
repo-card 1 symbol
- fn
createGitHubCard(repoData: GitHubRepoData): ElementCreate GitHub card element from repo data.
search 8 symbols
- fn
buildSearchIndex(srcDir: string, base: string, extensions: readonly string[] = DEFAULT_MARKDOWN_EXTENSIONS): Promise<string>Builds the search index from Markdown files. - 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/ind… - 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 @scope prefixes. - fn
resolveSearchOptions(options: SearchOptions | boolean | undefined): ResolvedSearchOptionsResolves search options with defaults. - module
searchFull-text search functionality for Ox Content. Generates search index at build time and… - fn
writeSearchIndex(indexJson: string, outDir: string): Promise<void>Writes the search index to a file.
ssg 25 symbols
- 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
buildThemeNavItems(sidebar: SidebarItem[], base: string, extension: string): NavGroup[]Builds navigation items from an explicit theme sidebar tree. - fn
collectMarkdownFiles(srcDir: string, extensions: readonly string[] = DEFAULT_MARKDOWN_EXTENSIONS): Promise<string[]>Collects all markdown files from the source directory. - variable
const DEFAULT_HTML_TEMPLATE = "<!-- ox-content default HTML template is Rust-backed -->"Deprecated compatibility export for consumers that imported the former TypeScript SSG t… - 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, locale?: string, availableLocales?: LocaleConfig[]): Promise<string>Generates HTML page with navigation using Rust NAPI bindings. - fn
getHref(inputPath: string, srcDir: string, base: string, extension: string): stringConverts a markdown file path to an href. - 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. - variable
const localeCodesCache = new WeakMap<LocaleConfig[], string[]>()Per-build cache for the locale-code list passed to getSsgPageLocale. The i18n.locales r… - interface
NavGroupNavigation group for hierarchical navigation. - variable
const navGroupsForRustCache = new WeakMap<NavGroup[], RustNavGroup[]>()Per-build cache for the Rust-facing nav conversion. navGroups is the same context.navIt… - fn
resolveNavigationGroups(navigation: SsgNavigationGroup[] | undefined, base: string, extension: string): NavGroup[] | undefinedResolves manual navigation config to the format used by the built-in SSG renderer. - fn
resolveSsgOptions(ssg: SsgOptions | boolean | undefined): ResolvedSsgOptionsResolves SSG options with defaults. - interface
RustLocaleRust-facing locale shape. - variable
const rustLocalesCache = new WeakMap<LocaleConfig[], RustLocale[]>()Per-build cache for the Rust-facing locale list. i18n.locales is the same reference for… - interface
RustNavGroupNAPI-facing nav group shape produced from a NavGroup. - module
ssgSSG (Static Site Generation) module for ox-content - interface
SsgEntryPageConfigEntry page configuration for SSG (passed to Rust). - interface
SsgNavItemNavigation item for SSG. - interface
SsgPageDataPage data for SSG. - fn
toRustTocEntry(entry: TocEntry): TocEntryConverts a TocEntry tree into the plain shape the Rust binding expects. Hoisted to modu…
tabs 6 symbols
- fn
generateTabsCSS(groupCount: number): stringGenerate dynamic CSS for :has() based tab switching. This is needed because :has() sele… - fn
getTabGroupCounter(): numberRead the shared tab group counter. Other tab-like transforms (such as the package-manag… - fn
resetTabGroupCounter(): voidReset tab group counter (for testing and per dev-server request). - fn
setTabGroupCounter(value: number): voidSet the shared tab group counter (advanced by other tab-like transforms). - module
tabsTabs Plugin - Pure CSS implementation Transforms <Tabs>/<Tab> components into accessibl… - fn
transformTabs(html: string): Promise<string>Transform Tabs components in HTML.
template 3 symbols
- fn
escapeHtml(str: string): stringEscapes HTML special characters. - fn
getDefaultTemplate(): OgImageTemplateFnReturns the built-in default template function. - module
templateDefault OG image template. Uses inline HTML/CSS for a flat, low-color brand card with t…
theme-renderer 10 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. - module
theme-rendererTheme Renderer for Static HTML Generation Renders JSX theme components to static HTML s… - type
ThemeComponent = (props: ThemeProps) => JSXNodeTheme component type. - interface
ThemePropsProps passed to the theme component. - interface
ThemeRenderOptionsTheme render options.
theme 29 symbols
- fn
deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): TDeep merge two objects. - variable
const defaultTheme: ThemeConfigDefault theme configuration. Based on the current ox-content SSG styles. - fn
defineTheme(config: ThemeConfig): ThemeConfigDefines a theme configuration with type checking. - interface
LegacySocialLinksLegacy social links configuration. - fn
mergeThemes(...themes: ThemeConfig[]): 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
SocialLinkCustom social link. - type
SocialLinkIcon = string | { svg: string }Custom social link icon. - type
SocialLinks = LegacySocialLinks | SocialLink[]Social links configuration. - module
themeTheme API for ox-content SSG Provides VitePress-like theming with default theme + custo… - 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 2 symbols
- fn
rehypeGitHub(repoDataMap: Map<string, GitHubRepoData | null>, sourceDataMap: Map<string, GitHubSourceData | null>, options: Required<GitHubOptions>)Rehype plugin to transform GitHub components. - fn
transformGitHub(html: string, repoDataMap?: Map<string, GitHubRepoData | null>, options?: GitHubOptions): Promise<string>Transform GitHub components in HTML.
transform 9 symbols
- 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… - 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. - interface
SsgTransformOptionsSSG-specific transform options. - module
transformMarkdown Transformation Engine This module handles the complete transformation pipeline…
types 5 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. - module
typesType definitions for Chromium-based OG image generation.
types 73 symbols
- interface
AttrsOptionsOptions for markdown-it-attrs style attribute blocks. Attribute blocks let authors atta… - interface
BuiltinEmbedOptionsBuilt-in embed configuration. - interface
BuiltinPmOptionsOptions for the package-manager install-tab transform. - 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
CodeBlockLintOptionsOptions for linting fenced code blocks during Markdown transforms. These checks are int… - interface
CodeBlockTypecheckOptionsOptions for type-checking TypeScript and TSX fenced code blocks. Type-checking writes m… - interface
CodeImportOptionsOptions for importing source snippets into code fences. The transform resolves <<< impo… - interface
CollectionEntryQueryable Markdown collection entry. - type
CollectionIncludeField = "body" | "html" | "toc"Extra payload fields embedded into collection entries. Keep this list small for large s… - interface
CollectionManifestGenerated collection manifest. - interface
CollectionOptionsCollection source configuration. - type
CollectionsOptions = Record<string, CollectionOptions | string | readonly string[]>Top-level collection definitions. - interface
DocEntryA single documentation entry extracted from source. Entries represent top-level declara… - interface
DocMemberA member belonging to a class, interface, type alias, or enum entry. - type
DocsEntryPoint = string | { path: string; name?: string }Public API entry point for grouped documentation. - interface
DocsOptionsOptions for source documentation generation. The generator extracts JSDoc/TSDoc comment… - interface
DocsSummarySummary counts emitted with generated documentation data. - interface
DocsTestOptionsOptions for extracting fenced examples into docs-as-tests fixtures. The extractor colle… - interface
EditThisPageOptionsOptions for appending an "edit this page" link. The generated link points at the source… - interface
EmojiShortcodeOptionsOptions for expanding :shortcode: emoji aliases. The transform replaces recognized shor… - 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. i18n is opt-in because it changes routing and buil… - interface
LocaleConfigLocale configuration. Locales define the routing and display metadata used by the i18n… - 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
OxContentOptionsOptions for the core oxContent() Vite plugin. The top-level options describe where cont… - interface
ParamDocParameter documentation. - interface
ResolvedAttrsOptionsResolved attrs transform options. - interface
ResolvedBuiltinEmbedOptionsResolved built-in embed configuration. - interface
ResolvedCodeAnnotationsOptionsResolved code annotation configuration. - interface
ResolvedCodeBlockLintOptionsResolved code-block lint options. - interface
ResolvedCodeBlockTypecheckOptionsResolved code-block type-check options. - interface
ResolvedCodeImportOptionsResolved code-import transform options. - interface
ResolvedCollectionOptionsResolved collection definition. - interface
ResolvedCollectionsOptionsResolved collection options. - interface
ResolvedDocsEntryPointResolved public API entry point. - interface
ResolvedDocsOptionsResolved docs options with all defaults applied. - interface
ResolvedDocsTestOptionsResolved docs-as-tests extraction options. - interface
ResolvedEditThisPageOptionsResolved edit-link transform options. - interface
ResolvedEmojiShortcodeOptionsResolved emoji-shortcode transform options. - 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
ResolvedSanitizeOptionsResolved sanitize transform options. - interface
ResolvedSearchOptionsResolved search options. - interface
ResolvedSsgOptionsResolved SSG options. - interface
ResolvedWikiLinkOptionsResolved wiki-link transform options. - interface
ReturnDocReturn type documentation. - interface
SanitizeOptionsOptions for sanitizing rendered HTML. Sanitization happens after Markdown is rendered t… - interface
ScopedSearchQueryParsed search query with optional scope prefixes. - interface
SearchDocumentSearch document structure. - interface
SearchOptionsOptions for full-text search. Search indexes are built from Markdown content at build t… - interface
SearchResultSearch result structure. - interface
SsgNavigationGroupNavigation group for SSG sidebar rendering. - interface
SsgNavigationItemNavigation item for SSG sidebar rendering. - interface
SsgOptionsStatic Site Generation options. These options control the HTML files emitted at build t… - interface
ThrowsDocException/error documentation. - interface
TocEntryTable of contents entry. - interface
TransformContextTransform context passed to transformers. - interface
TransformResultTransform result. - module
typesType definitions for @ox-content/vite-plugin - interface
WikiLinkOptionsOptions for expanding Obsidian-style wiki links. The transform accepts [target] and [ta…
vitepress 5 symbols
- fn
convertVitePressNav(nav: VitePressNavItem[]): SsgNavigationGroup[]Converts VitePress top navigation into ox-content sidebar groups. This is used as a fal… - fn
convertVitePressSidebar(sidebar: VitePressSidebar): SsgNavigationGroup[]Converts a VitePress sidebar config into ox-content navigation groups. Nested VitePress… - fn
fromVitePressConfig(config: VitePressConfig, overrides: OxContentOptions = {}): OxContentOptionsCreates ox-content plugin options from an existing VitePress config. - fn
generateVitePressMigrationConfig(config: VitePressConfig, overrides: OxContentOptions = {}, options: GenerateVitePressMigrationConfigOptions = {}): stringGenerates a TypeScript module exporting migrated ox-content options. This is used by th… - fn
normalizeVitePressFrontmatter(frontmatter: Record<string, unknown>): Record<string, unknown>Normalizes VitePress-specific frontmatter into ox-content's entry-page shape.
youtube 3 symbols
- fn
extractVideoId(input: string): string | nullExtract YouTube video ID from various URL formats. - fn
transformYouTube(html: string, options?: YouTubeOptions): Promise<string>Transform YouTube components in HTML. - module
youtubeYouTube Plugin - Privacy-enhanced iframe embedding Transforms <YouTube> components into…