vocs
Vocs formatter for GraphQL documentation output.
Produces MDX compatible with Vite/Vocs using its native callout syntax
formatMDXPermalinkβ
const formatMDXPermalink: typeof formatMDXEscapedPermalink =
formatMDXEscapedPermalink;
Defined in: vocs/index.ts:40
Formats a permalink for a section header, using the classic {#id} syntax
escaped to remain valid MDX.
Vocs has no custom header id syntax, so the permalink is inert unless a
remark plugin is configured. Turn it off with
docOptions.sectionHeaderId: false.
Seeβ
https://vocs.dev/docs/markdown
Paramβ
id
The ID of the section header
Returnsβ
Formatted permalink string
mdxDeclarationβ
const mdxDeclaration: MDXString;
Defined in: vocs/index.ts:44
MDX import statement and inline component definitions prepended to every generated file.
mdxExtensionβ
const mdxExtension: ".mdx";
Defined in: vocs/index.ts:49
File extension used for generated pages.
createMDXFormatter()β
function createMDXFormatter(_meta?): Formatter;
Defined in: vocs/index.ts:125
Creates a Vocs formatter.
Parametersβ
_meta?β
Maybe<MetaInfo>
Unused metadata parameter
Returnsβ
Formatter
A complete Formatter implementation for Vocs MDX output
formatMDXAdmonition()β
function formatMDXAdmonition(admonition, _meta): MDXString;
Defined in: vocs/index.ts:69
Formats an admonition using Vocs native callout syntax (:::type[title]).
Maps warning type to warning; all other types use info.
Parametersβ
admonitionβ
AdmonitionType
Admonition data with text, title, and type
_metaβ
Maybe<MetaInfo>
Unused metadata parameter
Returnsβ
MDXString
Formatted Vocs callout string
formatMDXBadge()β
function formatMDXBadge(badge): MDXString;
Defined in: vocs/index.ts:57
Formats a badge using Vocs native text directive (:badge[...]).
Maps DEPRECATED classname to warning color; all others use default.
Parametersβ
badgeβ
Badge
Badge data containing text and optional classname
Returnsβ
MDXString
Formatted Vocs badge string
formatMDXBullet()β
function formatMDXBullet(text?): MDXString;
Defined in: vocs/index.ts:82
Formats a bullet point using the inline <Bullet/> component defined in mdxDeclaration.
Parametersβ
text?β
string = ""
Optional text to append after the bullet
Returnsβ
MDXString
Formatted Bullet component string
formatMDXLink()β
function formatMDXLink(link): TypeLink;
Defined in: vocs/index.ts:91
Appends .mdx to internal link URLs.
Parametersβ
linkβ
TypeLink
Link data with URL and text
Returnsβ
TypeLink
Link with .mdx extension appended to the URL
formatMDXNameEntity()β
function formatMDXNameEntity(name, parentType?): MDXString;
Defined in: vocs/index.ts:104
Formats a named entity as a JSX span with styled code elements.
Parametersβ
nameβ
string
Entity name
parentType?β
Maybe<string>
Optional parent type name for qualified references
Returnsβ
MDXString
Formatted JSX entity reference string