API Documentation#
Generated by Ox Content
Use search scopes like
@api transformto limit results to the generated API reference.
128
modules
793
symbols
330
functions
300
interfaces
40
types
26
variables
97
modules
635
parameters
1618
members
327
returns
20
examples
2
deprecated
Modules#
api 6 symbols
- fn
fetchGitHubResource(resource: GitHubResourceRef, options: Required<GitHubOptions>): Promise<GitHubResourceData | null>Fetch public GitHub issue, pull request, commit, discussion, or gist metadata. - 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
prefetchGitHubResources(resources: GitHubResourceRef[], options?: GitHubOptions): Promise<Map<string, GitHubResourceData | null>>Pre-fetch all GitHub resource cards. - fn
prefetchGitHubSources(sources: GitHubSourceRef[], options?: GitHubOptions): Promise<Map<string, GitHubSourceData | null>>Pre-fetch all GitHub source files.
apply-permalinks 5 symbols
- module
apply-permalinksApplies resolved permalinks / cascade to SSG pages and collection entries. - fn
applyCollectionRoutes(manifest: CollectionManifest, permalinks?: ResolvedPermalinksOptions | null, cascade?: ResolvedCascadeOptions | null): { manifest: CollectionManifest; errors: string[] }Rewrites collection path / stem / inherited frontmatter. - fn
applySsgPageRoutes(input: { pages: readonly SsgRoutablePage[]; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; srcDir: string; outDir: string; base: string; extension: string; siteUrl?: string; }): { pages: SsgRoutablePage[]; errors: string[] }Rewrites SSG routePaths from resolved permalinks / slugs. - fn
remapNavGroups<T extends NavGroup>(nav: T[], kept: readonly { fileUrl: string; urlPath: string; href: string }[], skippedFileUrls: readonly string[]): T[]Updates auto-nav hrefs after permalinks change a page URL. - interface
SsgRoutablePageSSG page shape that can have its routePaths rewritten.
attributes 3 symbols
- fn
collectGitHubRepos(html: string): Promise<string[]>Collect all GitHub repos from HTML for pre-fetching. - fn
collectGitHubResources(html: string): Promise<GitHubResourceRef[]>Collect all GitHub issue, pull request, commit, discussion, and gist refs. - fn
collectGitHubSources(html: string): Promise<GitHubSourceRef[]>Collect all GitHub source references from HTML for pre-fetching.
block-structure 2 symbols
- fn
blockEmbedTags(): Promise<ReadonlySet<string>>Every tag whose embed is a block, taken from the registry rather than copied. A hand-ke… - variable
const TYPESCRIPT_ONLY_BLOCK_EMBED_TAGS = ["github", "ogcard", "reddit", "youtube"] as constBlock embeds this package owns, which the Rust provider registry cannot name. NotByAI i…
blog-feed-date 1 symbol
- module
blog-feed-datePublication dates from RSS / Atom items.
blog-feed-fetch 2 symbols
- module
blog-feed-fetchBuild-time fetch of configured blog feeds. Never used for document URLs. - fn
installBlogFeedNetwork(network: BlogFeedNetwork): voidTest hook. Production builds leave this empty.
blog-feed-parse 1 symbol
- module
blog-feed-parseRSS 2.0 / Atom 1.0 item extraction. HTML documents are rejected.
blog-feed-url 2 symbols
- module
blog-feed-urlSafe-URL checks for configured external blog feeds. - variable
const CONTROL_CHARS = /[\n\r\t\0]/Safe-URL checks for configured external blog feeds.
blog-feeds 1 symbol
- module
blog-feedsLoad, normalize, and merge configured external blog feeds.
blog-html 3 symbols
- module
blog-htmlEscaped blog index, tag, archive, and post-meta HTML. - interface
BlogSourcePageOne listed post considered for blog surfaces. - fn
isSafeBlogUrl(value: string): booleanhttps: or a same-origin path starting with / but not //.
blog-options 2 symbols
- module
blog-optionsBlog option resolution. - fn
resolveBlogCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefinedPicks a collection named blog, else the only configured collection. An explicit name al…
blog-pages 4 symbols
- fn
appendBlogPages(input: { generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>; listedPages: readonly BlogSourcePage[]; options?: ResolvedBlogOptions; collections?: ResolvedCollectionsOptions; srcDir: string; outDir: string; base: string; render: (page: BlogGeneratedPage) => Promise<string>; errors: string[]; feedNetwork?: BlogFeedNetwork; }): Promise<void>Renders index, tag, and archive pages and appends them to the build. - module
blog-pagesGenerated blog index, tag, and archive pages. - interface
BlogGeneratedPageSynthetic page passed back to generateHtmlPage. - fn
toBlogProcessResult(page: BlogGeneratedPage): { inputPath: string; routePaths: { outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string; }; transformedHtml: string; title: string; frontmatter: Record<string, unknown>; toc: []; }Maps a generated blog page onto the SSG render shape.
blog-posts 1 symbol
- module
blog-postsBlog post selection, tags, authors, and dates.
blog-reading 2 symbols
- module
blog-readingDeterministic blog reading-time estimates. - variable
const LATIN_WORDS_PER_MINUTE = 200Deterministic blog reading-time estimates.
browser 6 symbols
- module
browserChromium browser session with automatic cleanup via Explicit Resource Management. Usage… - interface
OgBrowserPool extends AsyncDisposableA set of independent sessions, closed together. - 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… - fn
openBrowserPool(size: number): Promise<OgBrowserPool | null>Opens up to size independent browsers. Rendering does not parallelize inside one browse… - interface
PooledPageA pooled page and the public directory its route handler was set up for.
cache 5 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
isCached(cacheDir: string, key: string): Promise<boolean>Whether a cached PNG exists, without reading it. Deciding whether the browser has to st… - fn
writeCache(cacheDir: string, key: string, png: Buffer): Promise<void>Writes a PNG buffer to the cache.
citations 1 symbol
- fn
isLinkLabel(markdown: string, match: RegExpMatchArray): booleanA bracketed span that a destination or reference immediately follows is a Markdown link…
collection-asset-html 1 symbol
- fn
rewriteCollectionAssetUrls(input: RewriteCollectionAssetUrlsInput): RewriteCollectionAssetUrlsResultRewrites host-rendered HTML references from collection aliases to their content-address…
collection-assets 7 symbols
- interface
CollectionAssetInputOne collection file and the public URLs that should expose it. - interface
CollectionAssetManifestA reusable asset plan for a custom host's build writer and development middleware. Sour… - interface
CollectionAssetManifestEntryA source file, its normalized aliases, and its content-addressed URL. - fn
createCollectionAssetsMiddleware(manifest: CollectionAssetManifest): AssetMiddlewareCreate Connect-compatible middleware that serves planned aliases and their content-addr… - fn
planCollectionAssets(input: PlanCollectionAssetsInput): Promise<CollectionAssetManifest>Hash collection files and normalize their public aliases without taking over the host r… - interface
PlanCollectionAssetsInputInputs for a content-addressed collection asset manifest. - fn
writeCollectionAssets(input: WriteCollectionAssetsInput): Promise<WriteCollectionAssetsResult>Write each content-addressed target once, then materialize its aliases with hard links…
contributors 2 symbols
- module
contributorsOpt-in git contributor list helpers. Resolution and ignore filtering live here. git log… - fn
resolveContributorsOption(value: boolean | ContributorsOptions | undefined): ResolvedContributorsResolves ssg.contributors with defaults. false / omitted stays off. true enables names…
cross-reference-html 3 symbols
- module
cross-reference-htmlThe escaping and prose-scanning helpers the citation pass still needs. The cross-refere… - variable
const PROTECTED_TEXT_RE = /<!--[\s\S]*?-->|<(pre|code|script|style|textarea|a)\b[\s\S]*?<\/\1>/giThe escaping and prose-scanning helpers the citation pass still needs. The cross-refere… - fn
transformText(html: string, replacer: (text: string) => string): stringRuns replacer over every stretch of prose, skipping verbatim elements.
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
- 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 7 symbols
- module
docsSource Documentation Extraction and Generation This module provides comprehensive tools… - fn
existingGeneratedAt(outDir: string): string | undefinedKeep docs.json's timestamp stable across regenerations of the same tree. - 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
generateOpenApiDocs(options: ResolvedDocsOptions, root = process.cwd()): GeneratedOpenApiDocsGenerates Markdown documentation from local OpenAPI 3.0/3.1 files. - fn
resolveDocsOptions(options: false): falseResolves docs options with defaults. - fn
writeDocs(docs: Record<string, string>, outDir: string, extractedDocs?: ExtractedDocs[], options?: ResolvedDocsOptions, extraNav: DocsNavigationItem[] = []): Promise<void>Writes generated documentation to the output directory.
document-imports 1 symbol
- module
document-importsResolve MDX component imports relative to the document that declared them. Only ./ and…
document-islands 1 symbol
- module
document-islandsCombine document-local import resolution with MDX island discovery.
embed-transform 4 symbols
- module
embed-transformReserve first-party embed components so MDX island lowering cannot swallow them. Rust s… - variable
const PAYLOAD_SCRIPT = /^\s*<script type="application\/json">[\s\S]*?<\/script>/Reserve first-party embed components so MDX island lowering cannot swallow them. Rust s… - variable
const RESERVED_BUILTIN_COMPONENTS = [ "GitHub", "OgCard", "Tweet", "XPost", "Reddit", "Bluesky", "GoogleMaps", "Qiita", "Zenn", "NpmPackage", "CratesIo", "PyPI", "DockerHub", "CodePen", "JSFiddle", "Observable", "Vimeo", "Twitch", "Discord", "Fediverse", "Mastodon", "Misskey", "Mixi2", "Facebook", "Threads", "Instagram", "Spotify", "AppleMusic", "SpeakerDeck", "Audio", "Video", "StackBlitz", "WebContainer", "YouTube", "NotByAI", ] as constCanonical PascalCase names for first-party embed / media components. Keep in sync with… - fn
restoreReservedBuiltinIslands(html: string, localNames?: Iterable<string>): stringReplace reserved built-in islands with the original HTML tags so embed transforms can s…
environment 7 symbols
- fn
createEnvironmentPlugins(options: ResolvedOptions)Environment plugin factory. Creates plugins specific to the Markdown environment. - fn
createMarkdownEnvironment(options: ResolvedOptions, runtime: OxContentJavaScriptRuntime = detectJavaScriptRuntime()): EnvironmentOptionsCreates the Markdown processing environment configuration. This environment is used for… - fn
createTransformOptions(ctx: EnvironmentTransformContext, options: ResolvedOptions): ResolvedOptionsCreates environment-aware transform options. - fn
detectJavaScriptRuntime(): OxContentJavaScriptRuntimeDetects the runtime that is executing Vite. - 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.
feed-date 1 symbol
- fn
parseDate(value: string | undefined): ParsedDate | undefinedParse a feed date: epoch seconds, epoch milliseconds, or a civil date-time with an opti…
feed-format 1 symbol
- module
feed-formatShapes the feed pipeline passes between item selection and the native renderer. The bod…
feeds-native 3 symbols
- interface
FeedChannelExtrasChannel fields the formats emit when the standard has a matching slot. - module
feeds-nativeBridges the resolved feed inputs onto generateFeedBodies. The TypeScript renderer this… - fn
nativeItem(item: FeedEntry): Record<string, unknown>FeedEntry carries the date already parsed into UTC components; the native side takes th…
feeds 6 symbols
- module
feedsOpt-in RSS / Atom / JSON Feed helpers. Bodies come from oxcontentssg::generate_feeds… - interface
FeedsRenderInputInputs for rendering feed bodies. - interface
FeedsRenderResultRendered feed bodies, or a skip warning. - fn
generateFeeds(input: FeedsRenderInput): FeedsRenderResultBuilds RSS / Atom / JSON Feed bodies without writing files. - fn
resolveFeedCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefinedPicks content, else the first configured collection name. - fn
resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptionsResolves feeds with defaults. false / omitted stays off. true enables all three formats…
header-chrome 10 symbols
- module
header-chromeOpt-in header nav, announcement, and per-page chrome helpers. - interface
HeaderNavItemHeader nav link or dropdown. - type
LocaleLabel = string | Record<string, string>Plain label or locale map ({ en: "Guide", ja: "ガイド" }). - interface
PageChromeFlagsPer-page frontmatter chrome flags. false hides that region. - fn
parsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlagsReads hide flags from frontmatter. Non-boolean values are ignored. - interface
ResolvedHeaderNavItemNav item after locale maps are flattened to strings. - fn
resolveHeaderNavItems(items: HeaderNavItem[] | undefined, locale?: string, defaultLocale?: string): ResolvedHeaderNavItem[] | undefinedResolves locale maps so NAPI always receives string labels. - fn
resolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): stringPicks the exact locale, its language, the default locale, then the first non-empty own… - fn
resolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): booleanfalse or omitted stays off. true or {} enables default flag reading. - interface
ThemeAnnouncementAnnouncement bar. Text is escaped; no raw HTML slot.
highlight-native 6 symbols
- fn
getTextContent(node: Element | Root): stringExtract text content from a hast node. - module
highlight-nativeThe native tree-sitter highlighting path, plus the small hast helpers the per-block wal… - fn
highlightDocumentNatively(html: string): Promise<NativeDocument | null>Highlights every code block in a rendered document in one native call. Returns the rewr… - fn
highlightNatively(code: string, lang: string): string | nullHighlights with the native tree-sitter engine, or null when it has no grammar for lang.… - interface
NativeDocumentWhat highlightDocumentNatively produced for a page. - interface
PendingBlockA block the native pass left unhighlighted (no grammar).
highlight 4 symbols
- module
highlightSyntax highlighting with the native tree-sitter engine. Markup uses <pre class="ox-high… - fn
highlightCode(html: string): Promise<string>Apply native tree-sitter highlighting to HTML. Tries the document pass first. If that p… - fn
highlightPageHtml(html: string, mergeHighlightedCodeBlocks: (originalHtml: string, highlightedHtml: string) => string): Promise<string>Highlight every code block in a rendered page, preserving original classes and per-line… - fn
rehypeNativeHighlight()Per-block walk used when the native document pass cannot read the markup. Unknown langu…
hosted-module 1 symbol
- fn
embedSearchJson(value: unknown): stringJSON-embeds a value so it stays inert inside a script tag.
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.
icons-css 1 symbol
- module
icons-cssResolve Iconify JSON collections and emit CSS-mask rules. Collections come from install…
icons 3 symbols
- module
iconsOpt-in self-hosted Iconify CSS for used and safelisted icons. Collection lookup stays o… - fn
renderSelfHostedIconsCss(input: RenderSelfHostedIconsCssOptions): Promise<RenderSelfHostedIconsCssResult>Render resolved icon CSS. Missing collections or names become errors. - fn
writeSelfHostedIcons(input: WriteSelfHostedIconsOptions): Promise<WriteSelfHostedIconsResult>Copy resolved icon CSS into outDir. Missing collections or names become errors.
index 3 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.
index 1 symbol
- module
indexIsland Architecture support for ox-content Provides parsing and transformation of <Isla…
index 22 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
defaultConcurrency(): numberHow many pages to render at once when the caller does not say. Rendering was serial by… - 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. - fn
isBareSpecifier(id: string): booleanWhether id is a bare specifier, and so resolvable at runtime rather than something the… - interface
KeyedPageEntry extends OgImagePageEntryA page entry with its cache key computed once. - fn
mapWithSessions<Item, Result>(items: readonly Item[], sessions: readonly OgBrowserSession[], render: (item: Item, session: OgBrowserSession) => Promise<Result>): Promise<Result[]>Runs render over items, one at a time per session, in input order. A shared cursor rath… - interface
OgImagePageEntryA single page entry for batch OG image generation. - interface
OgImageResultResult of OG image generation for a single page. - variable
const OX_CONTENT_PACKAGE = /^@ox-content\/vite-plugin(\/.*)?$/Matches this package and every subpath it exports. A template's natural runtime is what… - fn
renderSinglePage(entry: KeyedPageEntry, templateFn: OgImageTemplateFn, options: ResolvedOgImageOptions, cacheDir: string, session: OgBrowserSession, publicDir?: string): Promise<OgImageResult>Renders a single page to PNG, with cache support. - fn
renderSingleSatoriPage(entry: KeyedPageEntry, templateFn: OgImageTemplateFn, options: ResolvedOgImageOptions, cacheDir: string, root: string): Promise<OgImageResult>Renders a single page to PNG using Satori, with cache support. - 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: KeyedPageEntry[], cacheDir: string): Promise<OgImageResult[] | null>Serves every page from cache when all of them are present. The probe is an existence ch… - fn
tsTemplateBundleOptions(templatePath: string)Rolldown input options for a .ts template bundle. A .ts template is the framework-less… - fn
withCacheKeys(pages: OgImagePageEntry[], templateSource: string, options: ResolvedOgImageOptions): KeyedPageEntry[]Attaches the cache key to each entry. The key is a SHA-256 over the template source and…
index 6 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
TransformAllOptions extends MediaEmbedOptionsTransform 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; /** * Document-local import bindings. A reserved built-in name in this set * stays an MDX island instead of running the first-party embed transform. */ localNames?: Iterable<string>; } & MediaEmbedOptions): Promise<string>Transform built-in embed components in HTML content. - variable
const TYPESCRIPT_ONLY_EMBED_TAGS = ["GitHub", "OgCard", "Reddit", "YouTube", "NotByAI"] as constEmbed tags this package owns, which the Rust provider registry cannot name. Everything…
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…
island-codegen 1 symbol
- module
island-codegenEmit static component imports for framework Markdown modules. Document-local bindings w…
island-ssr 2 symbols
- module
island-ssrOptional adapter-side island SSR. Framework plugins may supply renderIsland to replace… - type
RenderIslandFn = (name: string, props: Record<string, unknown>, filePath: string, slotHtml?: string) => string | Promise<string>Optional adapter-side island SSR. Framework plugins may supply renderIsland to replace…
jsx-dev-runtime 3 symbols
- module
jsx-dev-runtimeDevelopment-runtime entry point for the static HTML JSX transform. TypeScript's react-j… - fn
jsxDEV(type: JSXElementType, props: JSXProps, key?: string, _isStaticChildren?: boolean, _source?: JSXSource, _self?: unknown): JSXNodeCreates a JSX element in development mode. The transform passes isStaticChildren, sourc… - interface
JSXSourceSource position the dev transform attaches to each element.
jsx-html 18 symbols
- variable
const ATTR_ALIASES: Record<string, string>React prop names whose HTML spelling is not the lowercased identifier. - 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-htmlCustom 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. - variable
const SVG_CAMEL_CASE = new Set(["viewBox"])SVG attributes that stay camelCase in HTML (they are case-sensitive). - fn
toHtmlAttr(name: string): stringConverts a JSX/React prop name to the HTML attribute the runtime emits. HTML attributes… - fn
when(condition: boolean, content: JSXNode): JSXNodeConditionally renders content.
jsx-runtime 1 symbol
- module
jsx-runtimeAutomatic-runtime entry point for the static HTML JSX transform. jsxImportSource makes…
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…
locale-nav 3 symbols
- module
locale-navRewrites default-theme nav hrefs to the current locale sibling when it exists. - fn
localizeHeaderNavItems(items: HeaderNavItem[] | undefined, options: LocalizeNavOptions): HeaderNavItem[] | undefinedResolves header labels and rewrites link values the same way as the sidebar. - fn
localizeNavGroups<T extends LocalizableNavGroup>(groups: T[], options: LocalizeNavOptions): T[]Resolves authored sidebar label maps and prefixes hrefs/paths with the current locale w…
locale-switcher 2 symbols
- fn
resolveLocaleSwitcherOption(value: boolean | Record<string, unknown> | undefined): booleanResolves ssg.localeSwitcher. Omitted / false stay off. true or an object enables the co… - interface
SsgLocalePathSibling page or locale-root href for one locale in the default-theme switcher.
markdown-source 15 symbols
- fn
buildMarkdownSourceIndex(input: { files: readonly string[]; srcDir: string; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; publishState?: ResolvedPublishStateOptions; }): Promise<Map<string, MarkdownSourceIndexEntry>>Builds a companion index from source files without transforming Markdown. - fn
injectMarkdownSourceAlternate(html: string, href: string): stringInserts <link rel="alternate" type="text/markdown"> before </head>. - fn
isMarkdownSourceRequest(pathname: string): booleanTrue when the request pathname is a .md companion URL. - module
markdown-sourceOpt-in Markdown source companions written beside generated HTML. Copies already-read so… - fn
markdownSourceHref(urlPath: string, base: string): string | undefinedPublic companion href, including base. Always ends in .md. - fn
markdownSourceHrefForPage(input: { source: string; fileUrl: string; frontmatter: Record<string, unknown>; base: string; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; publishState?: ResolvedPublishStateOptions; }): string | undefinedCompanion href for one page after permalink / publish-state checks. - interface
MarkdownSourceIndexEntryOne entry in the dev-server companion index. - fn
markdownSourceOutputPath(outDir: string, urlPath: string): string | undefinedFilesystem path for a companion, or undefined when it would escape outDir. - interface
MarkdownSourcePageInputOne page that may receive a source companion. - fn
parseSourceFrontmatter(source: string): Record<string, unknown>Frontmatter keys only — not a Markdown parse. - fn
resolveMarkdownSourceOptions(value: boolean | MarkdownSourceOptions | undefined): ResolvedMarkdownSourceOptionsResolves ssg.markdownSource with defaults. false / omitted stays off. true enables comp… - fn
resolveMarkdownSourceRequest(pathname: string, index: ReadonlyMap<string, MarkdownSourceIndexEntry>): MarkdownSourceIndexEntry | undefinedLooks up a companion after the site base has been stripped. - fn
shouldPublishMarkdownSource(frontmatter: Record<string, unknown>, publishState?: ResolvedPublishStateOptions): booleanWhether this page may publish a companion. Draft and unlisted source is never emitted.… - fn
writeMarkdownSourceFiles(input: WriteMarkdownSourceFilesInput): Promise<{ files: string[]; errors: string[] }>Writes enabled companions from already-read source bytes. - interface
WriteMarkdownSourceFilesInputInputs for writing companions next to generated HTML.
markdown-tables 1 symbol
- fn
enhanceMarkdownTables(root?: ParentNode, options: MarkdownTableEnhancementOptions = {}): numberMakes overflowing Markdown tables keyboard-scrollable without wrapping or replacing the…
markdown 2 symbols
- fn
isMdxFilePath(filePath: string): booleanReturns true when a resource id points at an MDX source file. - fn
resolveMdxForFilePath(filePath: string, configured?: boolean): booleanExplicit configuration wins; otherwise MDX follows the source extension.
math-assets 5 symbols
- fn
copyKatexAssets(outDir: string, formats: KatexFontFormats = "woff2"): Promise<string[]>Copies katex.min.css and the requested font formats into the SSG output. Returns an emp… - fn
createKatexAssetsPlugin(): PluginDev-server middleware that serves /_oxkatex__/* from katex/dist. - variable
const FONT_FORMATS = { woff2: [".woff2"], all: [".woff2", ".woff", ".ttf"] } as constFont formats KaTeX ships, newest first. - type
KatexFontFormats = keyof typeof FONT_FORMATSWhich of KaTeX's font formats to emit. - module
math-assetsServe and copy KaTeX CSS/fonts only when the optional katex package exists.
math 6 symbols
- fn
decodeHtmlAttr(value: string): stringDecodes the attribute back to the TeX the author wrote. The placeholder is escaped by R… - module
mathBuild-time KaTeX rendering for opt-in $…$ / $$…$$ math. KaTeX is an optional peer. Site… - type
MathErrorPolicy = "literal" | "error" | "render"What to do with a $…$ run KaTeX cannot parse. - interface
MathRenderFailureOne $…$ run KaTeX refused, for the caller to report. - fn
renderKatexMath(html: string, onError: MathErrorPolicy = "literal", failures?: MathRenderFailure[]): Promise<string>Replaces rust ox-math placeholders with static KaTeX HTML. Leaves the escaped TeX fallb… - fn
resolveKatexDist(): string | nullDirectory that contains katex.min.css and fonts/, or null.
mdx-islands 7 symbols
- fn
collectMdxIslandNamesFromHtml(html: string): string[]Collect data-ox-island names from Rust-rendered HTML. Used when an AST walk is unavaila… - fn
collectMdxJsxNamesFromAst(ast: unknown): string[]Collect named MDX JSX tags from a parsed mdast tree (JSON from NAPI parse()). Fragments… - type
ComponentRegistry = Readonly<Record<string, unknown>> | ReadonlyMap<string, unknown> | Iterable<string>Global component map: object, Map, or name list. - fn
discoverRegisteredMdxComponents(input: DiscoverRegisteredMdxComponentsInput): Promise<string[]>Resolve registered island names for an MDX document. Prefers a NAPI parse() AST walk. F… - fn
intersectHydratableComponentNames(names: Iterable<string>, components: ComponentRegistry, localNames?: Iterable<string>): string[]Keep names that are either globally registered or document-local bindings. - fn
intersectRegisteredComponentNames(names: Iterable<string>, components: ComponentRegistry): string[]Keep names that exist on the global component map, in first-seen order. - module
mdx-islandsDiscover registered MDX islands from the mdast tree or rendered HTML. Framework plugins…
media-marker 2 symbols
- fn
hasMediaMarker(html: string): Promise<boolean>True when the document contains any tag the transform could rewrite. The list comes fro… - variable
const TYPESCRIPT_ONLY_TAGS = ["reddit"] as constProviders that live in this package rather than the Rust registry, so the registry cann…
media 1 symbol
- fn
reportRefusedEmbeds(diagnostics: readonly { provider: string; url?: string | null; line: number; fallback: string }[]): voidWarns about tags an enabled provider refused. A refusal is invisible in the output — th…
mermaid-protect 6 symbols
- module
mermaid-protectProtects generated static SVG content from rehype HTML5 parser corruption. rehypeParse… - interface
MermaidSvgProtectionProtects generated static SVG content from rehype HTML5 parser corruption. rehypeParse… - fn
protectMermaidSvgs(html: string): MermaidSvgProtectionExtract <div class="ox-mermaid">...</div> blocks and replace with HTML comment placehol… - fn
protectStaticDiagramSvgs(html: string): MermaidSvgProtectionExtract generated static diagram blocks and replace them with HTML comment placeholders… - fn
restoreMermaidSvgs(html: string, svgs: Map<string, string>): stringRestore protected mermaid SVG blocks from placeholders. - fn
restoreStaticDiagramSvgs(html: string, svgs: Map<string, string>): stringRestore generated static diagram 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…
not-found 8 symbols
- variable
const FALLBACK_NOT_FOUND_MARKDOWN = `--- title: ${FALLBACK_NOT_FOUND_TITLE} --- # ${FALLBACK_NOT_FOUND_TITLE} The page you requested does not exist. Use search or the navigation to find what you need. `Built-in Markdown used when the configured source file is missing. - fn
isNotFoundSourceFile(filePath: string, srcDir: string, options?: ResolvedNotFoundOptions): booleanTrue when filePath is the enabled not-found source. - module
not-foundOpt-in custom 404 page helpers. Resolution and path rules live here. The Vite plugin wr… - fn
notFoundSearchDocumentId(source: string): stringSearch document id for a not-found source path. - fn
notFoundSearchExcludeIds(options?: ResolvedNotFoundOptions): string[]Search document ids that must not be indexed when the feature is on. - fn
resolveNotFoundOptions(value: boolean | NotFoundOptions | undefined): ResolvedNotFoundOptionsResolves ssg.notFound with defaults. false / omitted stays off. true enables 404.md → 4… - fn
resolveNotFoundOutputPath(outDir: string, output: string): stringAbsolute output path, confined to outDir. - fn
resolveNotFoundSourcePath(srcDir: string, source: string): stringAbsolute source path, confined to srcDir.
og-viewer 1 symbol
- module
og-viewerOG Viewer - Dev tool for previewing Open Graph metadata Accessible at /__og-viewer duri…
ogp 1 symbol
- module
ogpOGP Card Plugin - Link card embedding Transforms <OgCard> components into static link p…
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.
page-head 3 symbols
- interface
HeadInputBuild-time page-head input. Unhead-shaped, no client runtime. Unknown keys such as twit… - type
HeadValidationMode = false | "off" | "warn" | "strict"How invalid head descriptors are reported. - fn
renderHead(input: HeadInput): RenderedHeadResolve descriptors to escaped <head> markup. Build-time only.
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…
parse 3 symbols
- fn
decodeHtmlEntities(value: string): stringExpand the character references that show up in <meta> content. Metadata is markup, so… - fn
faviconUrl(html: string, pageUrl: string): string | undefinedThe site's own icon, never a third-party favicon lookup service. Routing every card thr… - fn
resolveMetaUrl(value: string, pageUrl: string): string | undefinedResolve a URL taken from page metadata against the page it came from. Open Graph lets a…
permalinks 8 symbols
- fn
escapeAttribute(value: string): stringEscapes a value for use in an HTML attribute. - module
permalinksOpt-in permalink / slug routing and index frontmatter cascade. Resolution follows oxc… - fn
resolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptionsResolves cascade. false / omitted stays off. true / {} enables. - interface
ResolvedRoutePageA page after cascade and optional permalink / slug rewriting. - fn
resolvePageRoutes(input: { pages: readonly RoutePageInput[]; permalinks?: ResolvedPermalinksOptions | null; cascade?: ResolvedCascadeOptions | null; }): RouteResolveOutputApplies cascade (when on) then permalink / slug rewriting (when on). Collisions skip th… - fn
resolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptionsResolves permalinks. false / omitted stays off. true / {} enables. - interface
RoutePageInputOne page considered for cascade and permalink resolution. - interface
RouteResolveOutputResolved pages plus collision / rejection errors.
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.
provider-article-values 1 symbol
- module
provider-article-valuesValue shaping for provider article cards: reading and writing tag attributes, and narro…
provider-disk-cache 5 symbols
- module
provider-disk-cacheA cross-build cache for provider card metadata. Open Graph cards have had one of these… - interface
ProviderCacheEntry<T>What one cache file holds. null data is a remembered miss. - fn
providerCacheFileName(key: string): stringA file name for a cache key. Hashed rather than escaped: a key carries a provider URL,… - fn
readProviderCache<T>(cacheDir: string | null, key: string, ttl: number, now: number): Promise<T | null | undefined>Reads a cached value. Returns undefined for "nothing usable here" and null for "this wa… - fn
writeProviderCache<T>(cacheDir: string | null, key: string, data: T | null, cachedAt: number): Promise<void>Writes a value, replacing any existing entry atomically.
provider-failure 5 symbols
- type
EmbedFailure = { kind: "unavailable"; status: number } | { kind: "missing"; status: number } | { kind: "fetch-failed"; reason: string } | { kind: "offline"; reason: string }Why a build-time embed lookup did not produce metadata. Every fetcher used to collapse… - fn
errorCode(error: Error): string | undefinedcause is where undici puts the syscall error; older runtimes use code. - variable
const OFFLINE_CODES = new Set([ "ENOTFOUND", "EAI_AGAIN", "ECONNREFUSED", "ENETUNREACH", "ENETDOWN", "EHOSTUNREACH", ])Node's fetch reports a missing network through cause.code. - variable
let offlineReported = falseAn offline build fails every lookup for the same reason, so it says so once. One line p… - module
provider-failureWhy a build-time embed lookup did not produce metadata. Every fetcher used to collapse…
publish-state 8 symbols
- fn
classifyPublishState(frontmatter: Record<string, unknown>, options: ResolvedPublishStateOptions | undefined): { output: boolean; listed: boolean }Classifies one frontmatter object. Never throws. - fn
filterNavGroups<T extends NavGroupLike>(groups: T[], hidden: ReadonlySet<string>): T[]Drops nav items that resolve to hidden (unpublished or unlisted) pages. - fn
hiddenNavKeys(pages: readonly PublishStatePage[], listed: readonly PublishStatePage[]): Set<string>Keys used to match a page against generated nav items. - interface
PartitionedPages<T>Split pages into production output vs listing surfaces. - fn
partitionPublishedPages<T extends { frontmatter: Record<string, unknown> }>(pages: readonly T[], options: ResolvedPublishStateOptions | undefined): PartitionedPages<T>Splits pages into those that write HTML and those that appear in listings. - module
publish-stateOpt-in draft / unlisted / scheduled page classification. - interface
PublishStatePageOne page considered for publish-state filtering. - fn
resolvePublishStateOptions(value: boolean | PublishStateOptions | undefined): ResolvedPublishStateOptionsResolves publishState with defaults. false / omitted stays off. true enables production…
pwa 8 symbols
- fn
generatePwa(input: PwaRenderInput): PwaRenderResultBuilds manifest / service-worker bodies without writing files. - fn
injectPwaPageTags(html: string, input: { options?: ResolvedPwaOptions | null; base?: string }): stringInjects rel=manifest (and the service-worker register script when offline) into a theme… - module
pwaOpt-in web app manifest and conservative service worker. The Vite plugin writes those f… - interface
PwaRenderInputInputs for rendering PWA file bodies. - interface
PwaRenderResultRendered PWA bodies, or a skip warning. - fn
resolvePwaOptions(value: boolean | PwaOptions | undefined): ResolvedPwaOptionsResolves pwa with defaults. false / omitted stays off. true enables the manifest and of… - fn
writePwaFiles(input: WritePwaFilesInput): Promise<{ files: string[]; warning?: string }>Writes enabled PWA files into outDir. - interface
WritePwaFilesInput extends PwaRenderInputInputs for writing PWA files next to generated HTML.
reader-chrome-options 2 symbols
- interface
ReaderChromeOptionsPer-control flags for ssg.readerChrome. Omitted fields stay on when the feature itself… - type
ResolvedReaderChrome = false | { copy: boolean; externalLinks: boolean; backToTop: boolean }Resolved reader chrome. false means no extra markup or JS.
reader-chrome 8 symbols
- fn
applyReaderChromeHtml(html: string, input: ReaderChromeInput = true): stringApply the same native reader-chrome HTML transform used by the built-in SSG. This rewri… - fn
readerChromeAttributes(input: ReaderChromeInput = true): Readonly<Record<string, "">>Root attributes consumed by the browser runtime. - fn
readerChromeCss(input: ReaderChromeInput = true): stringCSS shared by the built-in SSG and custom hosts. - fn
readerChromeScript(input: ReaderChromeInput = true): stringAuto-initializing script shared by the built-in SSG and custom hosts. - fn
renderReaderChromeAttributes(input: ReaderChromeInput = true): stringRender the root attributes as a leading-space HTML fragment. Useful in template strings… - fn
renderReaderChromeScriptTag(input: ReaderChromeInput = true): stringInline auto-init script for static hosts that do not bundle @ox-content/vite-plugin/rea… - fn
renderReaderChromeStyleTag(input: ReaderChromeInput = true): stringInline stylesheet tag for hosts that do not import @ox-content/vite-plugin/styles/reade… - fn
resolveReaderChromeInput(input: ReaderChromeInput = true): ResolvedReaderChromeResolve the public reader-chrome option shape. true mirrors ssg.readerChrome: true: cop…
redirect-provider 1 symbol
- fn
resolveRedirectProvider(explicit: RedirectProvider | undefined, env: NodeJS.ProcessEnv): { provider?: RedirectProvider; warning?: string }Resolves the _redirects host from an explicit option or CI env. Pass env so tests can i…
redirects 13 symbols
- fn
generateRedirectHtml(dest: string): stringStatic HTML redirect body. dest is escaped. - fn
isHostWildcardSource(from: string): boolean* is host-rule syntax (Netlify / Cloudflare), not a URL segment. - fn
isSafeDest(value: string): booleanSame-origin path: leading /, not //, and no scheme. - fn
normalizePath(value: string): string | nullStrips a trailing slash except for /. Unsafe values become null. - fn
planRedirectFiles(input: RedirectPlanInput): RedirectPlanPlans redirect HTML files without writing them. - interface
RedirectFilePlanOne planned static HTML redirect. - interface
RedirectPageInputOne page that may declare aliases or a single redirect source. - interface
RedirectPlanPlanned redirect files and optional host / JSON bodies. - interface
RedirectPlanInputInputs for planning redirect files. - module
redirectsOpt-in static redirects / aliases. HTML bodies follow oxcontentssg::generate_redirect… - fn
resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined, env: NodeJS.ProcessEnv = process.env): ResolvedRedirectsOptionsResolves redirects with defaults. false / omitted stays off. true or {} enables empty d… - fn
writeRedirectFiles(input: WriteRedirectFilesInput): Promise<{ files: string[] }>Writes planned redirect HTML (and optional host files) into outDir. - interface
WriteRedirectFilesInputInputs for writing redirect files next to generated HTML.
render-markdown 4 symbols
- fn
createMarkdownProcessor(options: OxContentOptions = {}): MarkdownProcessorResolves public options once so custom ssg: false hosts can reuse the pipeline. - interface
MarkdownProcessorProcessor that resolves OxContentOptions once and renders many documents. - module
render-markdownProgrammatic Markdown/MDX pipeline for hosts that do not import files through Vite. - fn
renderMarkdown(source: string, filePath: string, options: OxContentOptions = {}): Promise<TransformResult>Run the Vite plugin Markdown/MDX pipeline from public OxContentOptions. Returns structu…
renderer 4 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
routePublicDir(page: Page, publicDir: string): Promise<void>Serves local assets from publicDir for anything the card requests. Registered once per… - 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.
resolve-options 1 symbol
- fn
resolveOptions(options: OxContentOptions): ResolvedOptionsResolves plugin options with defaults.
resources-dedupe 4 symbols
- fn
hashResourceFile(filePath: string, ext: string, store: ResourceDedupeStore, reuseKey: string): Promise<string>SHA-256 of emitted bytes plus a NUL and the serving extension so the same payload canno… - fn
linkOrCopyAlias(canonical: string, alias: string, linker: typeof fs.link = fs.link): Promise<"link" | "copy">Prefer a hard link at the original output path. link failure removes any stale alias an… - module
resources-dedupeSite-wide content-addressed emit for identical page-resource bytes. Hashing streams the… - fn
rewriteToCanonicalUrl(originalSrc: string, canonicalPath: string): stringKeep leftover search/hash; drop consumed transform params.
resources-html 2 symbols
- variable
const RESOURCE_TAG = /<(?:img|video|audio|source|track|a)\b[^>]*>/giCollect local src, poster, and relevant href values from HTML tags. - module
resources-htmlCollect local src, poster, and relevant href values from HTML tags.
resources-image 1 symbol
- module
resources-imageBuild-time PNG/JPEG pixel helpers for page resources. PNG is decoded and re-encoded for…
resources-jpeg 1 symbol
- module
resources-jpegJPEG encode-only helpers for page resource transforms.
resources-process 1 symbol
- module
resources-processPage-resource HTML rewriting and transform writes.
resources-write 1 symbol
- module
resources-writeTransform cache writes for page resources.
resources 4 symbols
- fn
isInsideRoot(root: string, candidate: string): booleanTrue when candidate stays inside root after resolve. - fn
resolveResourcesOptions(value: boolean | ResourcesOptions | undefined): ResolvedResourcesOptionsResolves resources. Omitted / false stay off. true or {} enables defaults. An object en… - fn
resourceCacheKey(sourcePath: string, mtimeMs: number, transform: ResourceTransform): stringCache key for a source file plus transform. Changing mtime or params produces a differe… - module
resourcesOpt-in page-bundle resources and build-time image processing. A page directory is the b…
satori-renderer 1 symbol
- fn
renderHtmlToPngWithSatori(source: string, options: ResolvedOgImageOptions, root: string): Promise<Buffer>Render an HTML string to PNG using Satori and resvg.
search-filters 2 symbols
- module
search-filtersLanguage and version filters for the default search dialog. - fn
searchDocumentLocale(path: string, localeCodes: readonly string[], defaultLocale: string, versionPrefixes: readonly string[] = []): stringResolves a document path to a locale code after stripping version prefixes.
search-provider 5 symbols
- fn
generateHostedSearchModule(options: ResolvedSearchOptions): stringClient runtime that queries the hosted HTTP adapter. Misconfigured hosted search emits… - fn
hasForbiddenSearchCredentialFields(options: object): booleanReturns true when the options object names a write or admin credential. - fn
resolveHostedSearchConfig(options: SearchOptions, env: NodeJS.ProcessEnv = process.env): HostedSearchConfig | nullResolves hosted credentials from config or env. Missing or forbidden keys fail closed a… - module
search-providerOpt-in hosted search provider for virtual:ox-content/search. Local BM25 stays the defau… - fn
toLocalSearchRuntimeOptions(options: ResolvedSearchOptions)Runtime fields accepted by the native local BM25 module generator.
search 8 symbols
- fn
buildSearchIndex(srcDir: string, base: string, extensions: readonly string[] = DEFAULT_MARKDOWN_EXTENSIONS, publishState?: ResolvedPublishStateOptions, excludeDocumentIds: readonly string[] = [], mdx?: boolean, conditionalBlocks?: ResolvedConditionalBlockOptions, citations?: ResolvedCitationsOptions): Promise<string>Builds the search index from Markdown files. publishState is forwarded to the native in… - 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.
section-index-html 5 symbols
- fn
escapeSectionIndexHtml(value: string): stringEscapes text and attribute values in generated listing markup. - fn
isSafeSectionHref(value: string): booleanhttps:-free, same-origin or relative href. javascript: is rejected. - fn
renderSectionIndexHtml(title: string, items: readonly SectionIndexItem[], style: SectionIndexStyle): stringRenders the listing body. Titles are escaped; hostile hrefs are dropped. - module
section-index-htmlSection-index listing HTML and href safety. Titles are escaped. javascript: / data: / v… - interface
SectionIndexItemOne child link on a generated section index.
section-index-paths 1 symbol
- module
section-index-pathsSection-index URL, title, and output-path helpers.
section-index 6 symbols
- fn
appendSectionIndexPages(input: { generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>; collectedPages: readonly SectionIndexSourcePage[]; listedPages: readonly SectionIndexSourcePage[]; options?: ResolvedSectionIndexOptions; outDir: string; base: string; extension: string; errors: string[]; render: (page: SectionIndexGeneratedPage) => Promise<string>; }): Promise<void>Appends generated section indexes for directories that have no real index. - fn
resolveSectionIndexOptions(value: boolean | SectionIndexOptions | undefined): ResolvedSectionIndexOptionsResolves ssg.sectionIndex with defaults. false / omitted stays off. true enables card l… - module
section-indexOpt-in generated section index pages. Resolution and directory walking live here. Listi… - interface
SectionIndexGeneratedPageSynthetic page passed back to generateHtmlPage. - interface
SectionIndexSourcePageOne built page considered when deciding indexes and children. - fn
toSectionIndexProcessResult(page: SectionIndexGeneratedPage): { inputPath: string; routePaths: { outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string; }; transformedHtml: string; title: string; frontmatter: Record<string, unknown>; toc: []; }Maps a generated section index onto the SSG render shape.
site-maps 9 symbols
- fn
formatLastmod(timestampMs: number | undefined): string | undefinedUTC YYYY-MM-DD for W3C lastmod. Invalid or negative timestamps are dropped. - fn
generateSiteMaps(input: SiteMapsRenderInput): SiteMapsRenderResultBuilds sitemap / robots / llms bodies without writing files. - fn
resolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptionsResolves siteMaps with defaults. false / omitted stays off. true enables all three file… - module
site-mapsOpt-in sitemap.xml / robots.txt / llms.txt helpers. Bodies come from oxcontentssg::ge… - interface
SiteMapPageInputOne page considered for crawl manifests. - interface
SiteMapsRenderInputInputs for rendering crawl-manifest bodies. - interface
SiteMapsRenderResultRendered crawl-manifest bodies, or a skip warning. - fn
writeSiteMapFiles(input: WriteSiteMapFilesInput): Promise<{ files: string[]; warning?: string }>Writes enabled crawl manifests into outDir. - interface
WriteSiteMapFilesInputInputs for writing crawl manifests next to generated HTML.
ssg-output-write 7 symbols
- fn
resolveGitLastmod(filePath: string, root?: string): number | undefinedGit last-commit time for filePath in milliseconds. Same lookup buildSsg() uses for ssg.… - module
ssg-output-writeWriters for composable SSG outputs. Custom hosts call these without buildSsg(). - fn
writeMarkdownCompanions(input: WriteMarkdownSourceFilesInput): Promise<{ files: string[]; errors: string[] }>Write Markdown companions for host-rendered pages. Reuses writeMarkdownSourceFiles from… - fn
writeResourceFiles(input: WriteResourceFilesInput): Promise<WriteResourceFilesResult>Fingerprint, rewrite, and emit page resources for host-rendered HTML. Uses the same res… - interface
WriteResourceFilesInputInputs for writing fingerprinted page resources from host HTML. - interface
WriteResourceFilesPageOne host-rendered page that may receive resource fingerprinting. - interface
WriteResourceFilesResultRewritten host pages plus emitted resource paths.
ssg-output 5 symbols
- fn
planSsgOutputs(input: PlanSsgOutputsInput): SsgOutputPlanPlan resource, companion, feed, and sitemap outputs without rendering pages. ssg.enable… - interface
PlanSsgOutputsInputInputs for planning composable SSG outputs from host-rendered pages. - interface
PlanSsgOutputsOptionsSame option objects oxContent() / buildSsg() accept. ssg.enabled is ignored. - module
ssg-outputComposable SSG outputs for custom hosts that set ssg: false. Ox Content owns resource f… - interface
SsgOutputPlanPlanned writer inputs. Call the matching write* function for each feature.
ssg 35 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<SsgBuildResult>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 while retaining locale-map… - fn
canonicalPageUrl(context: BuildSsgContext, urlPath: string): string | undefinedAbsolute URL of a page, or undefined when ssg.siteUrl is not set. Built the same way ge… - 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
generateBarePage(page: SsgBarePage): stringGenerates a bare HTML page carrying head metadata and injected markup. Bare mode leaves… - fn
- fn
getHref(inputPath: string, srcDir: string, base: string, extension: string, routePrefix?: string): stringConverts a markdown file path to an href. - fn
getOutputPath(inputPath: string, srcDir: string, outDir: string, extension: string, routePrefix?: string): stringConverts a markdown file path to its corresponding HTML output path. - fn
getUrlPath(inputPath: string, srcDir: string, routePrefix?: 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
normalizeRoutePrefix(value?: string): string | undefinedNormalizes blog / /blog / /blog/ to blog. Empty or unsafe values stay off. - fn
parseSsgPagerOverride(value: unknown): SsgPagerOverride | undefinedParses prev / next frontmatter into a pager override. - 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. - fn
shouldGenerateOgImages(options: ResolvedOptions): booleanWhether this build emits one Open Graph image per page. ssg.bare deliberately does not… - fn
sitePathFromUrlPath(urlPath: string): stringTurns an SSG urlPath (guide or /) into a same-origin dest (/guide). - module
ssgSSG (Static Site Generation) module for ox-content - interface
SsgBarePageHead metadata and injected markup for a bare page. - interface
SsgBuildResultResult of an SSG build. - interface
SsgEntryPageConfigEntry page configuration for SSG (passed to Rust). - interface
SsgNavItemNavigation item for SSG. - interface
SsgPageDataPage data for SSG. - interface
SsgPagerOverrideFrontmatter override for one previous/next pager side. - fn
toRustTocEntry(entry: TocEntry): TocEntryConverts a TocEntry tree into the plain shape the Rust binding expects. Hoisted to modu… - fn
toThemePageData(pageResult: PageProcessResult, markdownSource?: string): ThemePageDataMaps an internal page result onto the theme renderer's page shape.
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.
taxonomies-html 2 symbols
- module
taxonomies-htmlEscaped taxonomy HTML and confined output paths. - interface
TaxonomySourcePageOne built page considered for terms and related lists.
taxonomies 7 symbols
- fn
appendTaxonomyPages(input: { generatedPages: Array<{ inputPath: string; outputPath: string; html: string }>; listedPages: readonly TaxonomySourcePage[]; options?: ResolvedTaxonomiesOptions; outDir: string; base: string; render: (page: TaxonomyGeneratedPage) => Promise<string>; errors: string[]; }): Promise<void>Renders themed list and per-term pages and appends them to the build. - fn
injectRelatedPages(pages: TaxonomySourcePage[], listed: readonly TaxonomySourcePage[], options?: ResolvedTaxonomiesOptions): voidAppends related-page HTML to source pages that share a listed term. - fn
resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | undefined): ResolvedTaxonomiesOptionsResolves taxonomies with defaults. false / omitted stays off. true enables tags and cat… - module
taxonomiesOpt-in taxonomy term pages and related-page lists. Resolution and HTML live here. The V… - interface
TaxonomyGeneratedPageSynthetic page passed back to generateHtmlPage. - fn
termSlug(term: string): string | undefinedStable URL slug for a frontmatter term. Returns undefined when the value cannot become… - fn
toTaxonomyProcessResult(page: TaxonomyGeneratedPage): { inputPath: string; routePaths: { outputPath: string; urlPath: string; href: string; ogImagePath: string; ogImageUrl: string; }; transformedHtml: string; title: string; frontmatter: Record<string, unknown>; toc: []; }Maps a generated taxonomy page onto the SSG render shape.
team 2 symbols
- fn
resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptionsResolves ssg.team with defaults. false / omitted stays off. true enables an empty membe… - module
teamOpt-in team / members page helpers. Resolution lives here. Member cards are rendered in…
template 4 symbols
- fn
escapeHtml(str: string): stringEscapes HTML special characters. - fn
getDefaultSatoriTemplate(): OgImageTemplateFnReturns the built-in template for the Satori renderer. The Chromium template intentiona… - 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-bootstrap 5 symbols
- fn
applyThemeBootstrap(options: ThemeBootstrapOptions = {}): ThemeBootstrapStateApply the resolved theme state to the configured root element. Hosts can reuse this ins… - fn
createThemeBootstrapScript(options: ThemeBootstrapOptions = {}): stringReturn the exact inline JavaScript body a static host can hash for CSP. - fn
renderThemeBootstrapScript(options: ThemeBootstrapOptions = {}, renderOptions: RenderThemeBootstrapScriptOptions = {}): stringRender an inline first-paint bootstrap tag. Use createThemeBootstrapScript() when a dep… - fn
resolveThemeBootstrapState(storedPreference: string | null | undefined, prefersDark: boolean, options: ThemeBootstrapOptions = {}): ThemeBootstrapStateResolve a stored theme preference to the root state the bootstrap applies. - fn
setThemeBootstrapPreference(preference: ThemeBootstrapPreference, options: ThemeBootstrapOptions = {}): ThemeBootstrapStatePersist a preference and apply it with the same root contract as the bootstrap.
theme-fonts-acquire 1 symbol
- module
theme-fonts-acquireResolve self-hosted faces from a local file / @fontsource directory or Google Fonts. Do…
theme-fonts 6 symbols
- fn
cssFamilyName(family: string): stringCSS font-family identifier; quotes names that are not a single ident. - fn
flattenThemeFonts(fonts: ThemeFontsLike): { sans?: string; mono?: string } | undefinedFlatten object fonts so JsThemeFonts stays { sans?: string; mono?: string }. - fn
namedFontVarsCss(fonts: ThemeFontsLike): stringExtra --octc-font-* variables for fonts.named. Roles stay in Rust theme CSS. - module
theme-fontsOpt-in web-font objects for theme.fonts, plus SSG self-host emission. NAPI still receiv… - interface
ThemeWebFontUnoCSS-inspired family descriptor. The string stack form remains valid. - fn
writeSelfHostedThemeFonts(options: WriteThemeFontsOptions): Promise<string[]>Copy self-hosted faces into outDir and write @font-face CSS.
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-tokens 6 symbols
- fn
expandExtendsChain(theme: ThemeTokenSource): ThemeTokenSource[]Flattens one layer's extends chain into base-first order, mirroring the SSG's own resol… - fn
renderThemeTokenCss(theme: ThemeTokenSource | ThemeTokenSource[], options: RenderThemeTokenCssOptions = {}): stringRenders a theme's --octc-* tokens as a standalone stylesheet. The built-in SSG emits th… - interface
RenderThemeTokenCssOptionsOptions for renderThemeTokenCss. - type
ThemeTokens = Record<string, string>Free-form --octc-* custom properties for themes that need more than the typed colors /… - interface
ThemeTokenSourceThe token-bearing shape of a theme. Declared structurally instead of importing ThemeCon… - fn
tokensToCss(light: ThemeTokens, dark: ThemeTokens): stringRenders light and dark token records as the three selectors the SSG runtime switches be…
theme 32 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. - fn
expandExtendsChain(config: ThemeConfig): ThemeConfig[]Flattens one layer's extends chain into base-first order. The seen guard keeps a theme… - interface
LegacySocialLinksLegacy social links configuration. - fn
mergeThemes(...themes: (ThemeConfig | ThemeConfig[])[]): ThemeConfigMerges multiple theme configurations. Later themes override earlier ones. Object fields… - 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 | ThemeConfig[]): ResolvedThemeConfigResolves a theme configuration by merging with its extends chain and defaults. An array… - interface
SidebarItemSidebar group or link, including recursively nested localized labels. - 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. - fn
themeCss(theme: ResolvedThemeConfig): stringToken blocks come first so a theme's own css stays the final word, and both land after… - interface
ThemeEmbedEmbedded HTML content for specific positions in the page layout. - interface
ThemeEntryPageEntry page theme configuration. - interface
ThemeFontsTheme font configuration. sans and mono accept a CSS stack string or a web-font object.… - interface
ThemeFooterTheme footer configuration. - interface
ThemeHeaderTheme header configuration. - interface
ThemeLayoutTheme layout configuration. - fn
themeToNapi(theme: ResolvedThemeConfig, locale?: string, base?: string, iconsEnabled = false): NapiThemeConfigConverts resolved theme to the format expected by Rust NAPI.
transform 2 symbols
- fn
- fn
transformGitHub(html: string, repoDataMap?: Map<string, GitHubRepoData | null>, options?: GitHubOptions): Promise<string>Transform GitHub components in HTML.
transform 12 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[], imports: MdxImport[], exports: string[], components: string[], crossReferences: CrossReferenceEntry[], citations: CitationReference[], bibliography: BibliographyEntry[], filePath: string): stringGenerates the JavaScript module code. MDX metadata is serialized as JSON. User import /… - 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
NapiTransformResultWhat the native transform entry points return. - interface
OgImageConfigOG image configuration. - interface
OgImageDataOG image data for generating social media preview images. - fn
runTransformers(napi: NapiBindings, markdown: string, napiOptions: JsTransformOptions, filePath: string, options: ResolvedOptions, transformers: readonly MarkdownTransformer[]): Promise<NapiTransformResult>Runs the configured transformers over the parsed tree. Markdown never passes through Vi… - interface
SsgTransformOptionsSSG-specific transform options. - module
transformMarkdown Transformation Engine This module handles the complete transformation pipeline… - variable
const UNHIGHLIGHTED_CODE_BLOCK = /<pre(?![^>]*ox-highlight)[^>]*><code class="language-/A <pre> that names a language but has not been highlighted yet. - fn
warnMathFailures(failures: MathRenderFailure[], filePath: string): voidReports every $…$ run KaTeX refused. Under the default policy the page keeps its prose,…
types 9 symbols
- interface
OgImageOptionsOG image generation options (user-facing). - type
OgImageRenderer = "chromium" | "satori"OG image rendering backend. - interface
OgImageSatoriFontFont file loaded by the Satori renderer. - type
OgImageSatoriFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900Font weight values supported by Satori. - interface
OgImageSatoriOptionsSatori renderer options. - 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 OG image generation.
types 1 symbol
- interface
TweetBodyDataRoot or quoted post body. Nested quoted_tweet is stripped during normalize.
types 193 symbols
- interface
A11yOptionsPer-control flags for ssg.a11y. Omitted fields keep the defaults when the feature itsel… - interface
AbbreviationsOptionsOptions for opt-in abbreviation and glossary expansion. - interface
AttrsOptionsOptions for markdown-it-attrs style attribute blocks. Attribute blocks let authors atta… - interface
BadgeOptionsOptions for opt-in {badge:variant} inline badges. - interface
BlogAuthorOne person in the blog.authors map. - type
BlogFeedFailurePolicy = "warn" | "error"How a failed external feed source is reported. - interface
BlogFeedSourceOne configured external blog feed. - interface
BlogOptionsOpt-in blog index, authors, tags, reading time, and archive. - interface
BuiltinEmbedOptionsBuilt-in embed configuration. - interface
BuiltinPmOptionsOptions for the package-manager install-tab transform. - interface
CardOptionsOptions for opt-in ::: card / ::: link-card / ::: card-grid blocks. - interface
CascadeOptionsOpt-in _index directory frontmatter cascade. false or omitted stays off. true or {} ena… - 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
CodeGroupOptionsOptions for opt-in ::: code-group fence groups. - 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
ConditionalBlockOptionsOptions for opt-in static conditional blocks. - interface
ContainerOptionsOptions for opt-in ::: type custom containers. - interface
ContainerTypeOptionsPer-type container presentation. - interface
ContributorsOptionsOpt-in git contributor list. - interface
DataTableOptionsOptions for opt-in csv-table / json-table fences. - interface
DefinitionListOptionsOptions for opt-in PHP Markdown Extra / mdBook-style definition lists. - 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
DocsNavigationItemNavigation item emitted for generated docs sidebars. - 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… - type
EditThisPageProvider = "github" | "gitlab" | "bitbucket" | "gitea"Forges with a known edit-URL shape. 'gitea' covers Forgejo, which kept the same path. - 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
FeedChannelOptionsOne feed's formats, source, output path, and channel metadata. - type
FeedFormat = "rss" | "atom" | "json"Feed file formats written during SSG. - interface
FeedItemAttachmentOne JSON Feed / enclosure attachment accepted by programmatic feeds. - interface
FeedItemAuthorOne feed item author accepted by programmatic feeds. - interface
FeedItemInputOne collection or programmatic item considered for a generated feed. - type
FeedsOptions = FeedChannelOptions | readonly FeedChannelOptions[] | { [name: string]: FeedChannelOptions }Opt-in RSS / Atom / JSON Feed files written during SSG. A single object is one default… - interface
FileTreeIconOptionsReplaceable file-tree icons. Values are trusted site-config SVG markup or CSS class tok… - interface
FileTreeOptionsOptions for opt-in file-tree fences. - interface
GeneratedDocsDataMachine-readable payload emitted alongside generated docs. - interface
GeneratedOpenApiDocsGenerated OpenAPI Markdown pages and sidebar metadata. - interface
HeadingPermalinksOptionsOpt-in visible heading permalinks. Headings already have stable ids. Enabling this appe… - 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
IconsOptionsOpt-in self-hosted Iconify CSS for used icons. Off by default. When enabled, the SSG bu… - interface
ImageGalleryOptionsOptions for opt-in static image galleries. - interface
ImageOptionsOptions for opt-in figures, captions, and lazy images. - interface
IncludeOptionsOptions for inlining Markdown files with <!-- @include: PATH -->. Relative paths resolv… - interface
JsonLdOptionsPer-control flags for ssg.jsonLd. Omitted fields keep the defaults when the feature its… - type
JsonLdPageType = "TechArticle" | "BlogPosting" | "WebPage"JSON-LD page node @type. Unknown values fall back to TechArticle. - interface
JsonLdPublisherOptionsOptional JSON-LD publisher. Empty or omitted fields are left out. - type
KatexFontFormats = "woff2" | "all"Which of KaTeX's font formats to emit. - interface
KeyboardKeysOptionsOptions for opt-in {kbd:...} inline keyboard keys. - interface
LocaleConfigLocale configuration. Locales define the routing and display metadata used by the i18n… - interface
MagicLinkAliasOne configured magic-link target. - interface
MagicLinkImageOverrideReplace the image for an exact href or prefix. - interface
MagicLinkOptionsOptions for opt-in {link:...} rich magic links. - interface
MarkdownNodeMarkdown AST node (simplified for TypeScript). - interface
MarkdownSourceOptionsOpt-in Markdown source companions written beside generated HTML. - interface
MarkdownTransformerCustom AST transformer. - type
MathErrorPolicy = "literal" | "error" | "render"What to do with a $…$ run KaTeX cannot parse. - interface
MathOptionsOptions for opt-in $…$ / $$…$$ math. Delimiter parsing lives in the native transform. T… - interface
MdxImportOne MDX import statement collected from the AST. - interface
MdxImportSpecifierOne binding created by an MDX import statement. - type
MdxImportSpecifierKind = "default" | "named" | "namespace"How a specifier was imported from an MDX import statement. - interface
NavItemNavigation item for sidebar navigation. - interface
NotByAiOptionsOptions for the opt-in <NotByAI /> authorship badge. - interface
NotFoundOptionsOpt-in custom 404 page written during SSG. - interface
OgImageOptionsOG image generation options. Uses Chromium or Satori rendering with customizable templa… - type
OgImageRenderer = "chromium" | "satori"OG image rendering backend. - interface
OgImageSatoriFontFont file loaded by the Satori renderer. - type
OgImageSatoriFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900Font weight values supported by Satori. - interface
OgImageSatoriOptionsSatori renderer options. - interface
OpenApiDocsInputOne local OpenAPI file consumed by generated REST API docs. - interface
OpenApiDocsOptionsObject form for configuring generated OpenAPI docs. - type
OpenApiDocsSource = string | OpenApiDocsInputOpenAPI docs shorthand accepted by docs.openapi. - interface
OxContentOptionsOptions for the core oxContent() Vite plugin. The top-level options describe where cont… - interface
ParamDocParameter documentation. - interface
PartialsOptionsOptions for parameterized Markdown partials with <!-- @partial: PATH k="v" -->. Bare na… - interface
PermalinksOptionsOpt-in frontmatter permalink / slug routing. false or omitted stays off. true or {} ena… - interface
PublishStateOptionsOpt-in draft / unlisted / scheduled page filtering. - interface
PwaOptionsOpt-in web app manifest and service worker written during SSG. Enabling offline (the de… - type
RedirectProvider = "netlify" | "cloudflare"Host that consumes the generated redirects file. Both values write the same redirects… - interface
RedirectsOptionsOpt-in static redirects, aliases, and path rewrites. A path map such as { "/old-guide":… - type
ResolvedA11y = false | { skipLinkLabel: string }Resolved skip-link / print styles. false means no extra markup or CSS. - interface
ResolvedAbbreviationsOptionsResolved abbreviation / glossary transform options. - interface
ResolvedAttrsOptionsResolved attrs transform options. - interface
ResolvedBadgeOptionsResolved inline-badge transform options. - interface
ResolvedBlogFeedSourceResolved external blog feed source. - interface
ResolvedBlogOptionsResolved blog options. - interface
ResolvedBuiltinEmbedOptionsResolved built-in embed configuration. - interface
ResolvedCardOptionsResolved card transform options. - interface
ResolvedCascadeOptionsResolved cascade options. - interface
ResolvedCodeAnnotationsOptionsResolved code annotation configuration. - interface
ResolvedCodeBlockLintOptionsResolved code-block lint options. - interface
ResolvedCodeBlockTypecheckOptionsResolved code-block type-check options. - interface
ResolvedCodeGroupOptionsResolved code-group transform options. - interface
ResolvedCodeImportOptionsResolved code-import transform options. - interface
ResolvedCollectionOptionsResolved collection definition. - interface
ResolvedCollectionsOptionsResolved collection options. - interface
ResolvedConditionalBlockOptionsResolved conditional-block transform options. - interface
ResolvedContainerOptionsResolved custom-container transform options. - type
ResolvedContributors = false | { ignore: string[]; avatars: boolean }Resolved git contributor list. false means the feature is off. - interface
ResolvedDataTableOptionsResolved data-table transform options. - interface
ResolvedDefinitionListOptionsResolved definition-list transform 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
ResolvedFeedChannelOne resolved feed channel. - interface
ResolvedFeedsOptions extends ResolvedFeedChannelResolved feed options. Legacy true / single-object configs keep one channel on the top-… - interface
ResolvedFileTreeOptionsResolved file-tree transform options. - interface
ResolvedHeadingPermalinksOptionsResolved heading permalink options. - interface
ResolvedI18nOptionsResolved i18n options with all defaults applied. - interface
ResolvedIconsOptionsResolved icon asset options. - interface
ResolvedImageGalleryOptionsResolved image gallery transform options. - interface
ResolvedImageOptionsResolved image transform options. - interface
ResolvedIncludeOptionsResolved Markdown-include transform options. - type
ResolvedJsonLd = false | { breadcrumbs: boolean; publisher?: { name?: string; url?: string }; type?: JsonLdPageType; graph?: Record<string, unknown>[] }Resolved JSON-LD options. false means no <script type="application/ld+json">. - interface
ResolvedKeyboardKeysOptionsResolved inline keyboard-key transform options. - interface
ResolvedMagicLinkOptionsResolved magic-link transform options. - interface
ResolvedMarkdownSourceOptionsResolved Markdown source-companion options. - interface
ResolvedMathOptionsResolved math transform options. - interface
ResolvedNotByAiOptionsResolved NotByAI authorship-badge options. - interface
ResolvedNotFoundOptionsResolved custom 404 options. - interface
ResolvedOgImageOptionsResolved OG image options with all defaults applied. - interface
ResolvedOpenApiDocsInputResolved local OpenAPI file input. - interface
ResolvedOpenApiDocsOptionsResolved generated OpenAPI docs options. - interface
ResolvedOptionsResolved options with all defaults applied. - interface
ResolvedPartialsOptionsResolved parameterized-partial transform options. - interface
ResolvedPermalinksOptionsResolved permalink options. - interface
ResolvedPublishStateOptionsResolved publish-state options. - interface
ResolvedPwaOptionsResolved PWA options. - interface
ResolvedRedirectsOptionsResolved redirect options. - interface
ResolvedResourcesOptionsResolved page-resource options. - interface
ResolvedSanitizeOptionsResolved sanitize transform options. - interface
ResolvedSearchOptionsResolved search options. - interface
ResolvedSectionIndexOptionsResolved generated section index options. - interface
ResolvedSiteMapsOptionsResolved crawl-manifest options. - interface
ResolvedSsgOptionsResolved SSG options. - interface
ResolvedStepsOptionsResolved step-list transform options. - interface
ResolvedTaxonomiesOptionsResolved taxonomy options. - interface
ResolvedTeamOptionsResolved team page options. - interface
ResolvedTimelineOptionsResolved timeline transform options. - interface
ResolvedTypedHoverOptionsResolved typed-hover options. - interface
ResolvedVersionEntryOne resolved version after prefix and banner sanitization. - interface
ResolvedVersionsOptionsResolved documentation versioning. - interface
ResolvedWikiLinkOptionsResolved wiki-link transform options. - interface
ResourcesOptionsOptions for opt-in page-bundle resources and image processing. - 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
SectionIndexOptionsOpt-in generated section index pages. - type
SectionIndexStyle = "list" | "cards"Listing style for a generated section index. - interface
SiteMapsOptionsOpt-in crawl manifests written during SSG. - 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
SsgOutputPageInputOne host-owned page for composable SSG outputs (ssg: false). The host renders HTML. Ox… - interface
StepsOptionsOptions for opt-in ::: steps ordered lists. - interface
TaxonomiesOptionsOpt-in term list pages, per-term pages, and related-page lists. - interface
TeamLinkOne link on a team member card. - interface
TeamMemberOne person on the team page. - interface
ThrowsDocException/error documentation. - interface
TimelineOptionsOptions for opt-in static timelines. - interface
TocEntryTable of contents entry. - interface
TransformContextTransform context passed to transformers. - interface
TransformResultTransform result. - interface
TypedHoverOptionsOptions for opt-in typed hover overlays on TypeScript fences. Hover strings are compute… - module
typesType definitions for @ox-content/vite-plugin - type
VersionBannerKind = "unreleased" | "unmaintained"Banner shown on pages that belong to one documented version. - interface
VersionEntryOne published or snapshot version of a docs tree. - interface
VersionsOptionsOpt-in documentation versioning. Off by default. true enables a single current entry. A… - interface
WikiLinkOptionsOptions for expanding Obsidian-style wiki links. The transform accepts [target] and [ta…
url 1 symbol
- fn
normalizeOgpUrl(url: string): stringNormalize a URL for cache keys: lowercase host, drop default ports and fragments, and s…
version-navigation 1 symbol
- module
version-navigationKeeps navigation inside a frozen documentation-version tree. Locale resolution runs bef…
versions-html 1 symbol
- module
versions-htmlEscaped version switcher, banner, and badge markup.
versions 6 symbols
- fn
currentVersionPrefix(options?: ResolvedVersionsOptions): stringPrefix used for the active version (empty string = site root). - fn
decorateVersionedPages(pages: Array<{ outputPath: string; html: string }>, options: ResolvedVersionsOptions, outDir: string, base: string): voidApplies switcher / banner / search rewrite after every version tree is generated. - fn
resolveSnapshotDir(root: string, dir: string): string | undefinedConfines a snapshot dir to root. - fn
resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptionsResolves versions. Omitted / false stay off. true enables a single current entry. An ob… - fn
versionLocation(outputPath: string, outDir: string, options: ResolvedVersionsOptions): { id: string; sibling: string }Version id and same-path remainder for a generated HTML file. - module
versionsOpt-in documentation versioning: prefixes, snapshots, and header chrome. Historical sna…
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 a YouTube video ID from a bare ID or a watch / share / embed / shorts URL. The… - fn
transformYouTube(html: string, options?: YouTubeOptions): Promise<string>Transform YouTube components in HTML. - module
youtubeYouTube Plugin - Privacy-enhanced iframe embedding Transforms <YouTube> components into…