honkit
HonKit formatter for GraphQL documentation output.
Produces plain Markdown compatible with HonKit static site generator. Internal links are converted to .html paths.
__defaultβ
const __default: object;
Defined in: honkit/index.ts:30
Type Declarationβ
formatMDXBulletβ
formatMDXBullet: (text) => MDXString;
Formats a bullet point separator using a <span> with a gqlmd-mdx-bullet CSS class.
Parametersβ
text?β
string = ""
Optional text to append after the bullet
Returnsβ
MDXString
Formatted bullet string
mdxExtensionβ
const mdxExtension: ".md";
Defined in: honkit/index.ts:33
File extension used for generated pages β HonKit renders plain Markdown to HTML.
createMDXFormatter()β
function createMDXFormatter(_meta?): Formatter;
Defined in: honkit/index.ts:171
Creates a HonKit formatter.
Parametersβ
_meta?β
Maybe<MetaInfo>
Unused metadata parameter
Returnsβ
Formatter
A complete Formatter implementation for HonKit output
formatMDXAdmonition()β
function formatMDXAdmonition(admonition, _meta): MDXString;
Defined in: honkit/index.ts:62
Formats an admonition as a Markdown blockquote with a bold prefix label.
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 blockquote string
formatMDXBadge()β
function formatMDXBadge(badge): MDXString;
Defined in: honkit/index.ts:48
Formats a badge as an inline HTML <span> with a shared default style.
Users can customize badge colors by providing their own formatMDXBadge implementation.
Parametersβ
badgeβ
Badge
Badge data containing text
Returnsβ
MDXString
Formatted inline HTML span string
formatMDXDetails()β
function formatMDXDetails(option): MDXString;
Defined in: honkit/index.ts:75
Formats a collapsible block as an HTML <details> element.
Parametersβ
optionβ
CollapsibleOption
Configuration for open/close label text
Returnsβ
MDXString
Formatted details element string
formatMDXFrontmatter()β
function formatMDXFrontmatter(props, formatted): MDXString;
Defined in: honkit/index.ts:91
Formats YAML front matter and appends an H1 heading derived from the title prop.
Merges props entries with formatted lines (formatted lines take precedence).
Returns empty string if props is empty or absent β HonKit renders front matter
without a title as literal YAML content.
Parametersβ
propsβ
Maybe<FrontMatterOptions>
Front matter options; title is used to generate the H1 heading
formattedβ
Maybe<string[]>
Pre-formatted front matter lines that override props values
Returnsβ
MDXString
Formatted front matter block with optional H1, or empty string
formatMDXLink()β
function formatMDXLink(link): TypeLink;
Defined in: honkit/index.ts:120
Converts internal link URLs to .html paths for HonKit static output.
Absolute paths without an .html extension are suffixed with .html.
External URLs and fragment-only links are returned unchanged.
Parametersβ
linkβ
TypeLink
Link data with URL and text
Returnsβ
TypeLink
Link with .html extension applied to absolute internal paths
formatMDXNameEntity()β
function formatMDXNameEntity(name, parentType?): MDXString;
Defined in: honkit/index.ts:149
Formats a named entity as plain text (no markup). HonKit renders plain Markdown β no JSX or code spans needed.
Parametersβ
nameβ
string
Entity name
parentType?β
Maybe<string>
Optional parent type name for qualified references
Returnsβ
MDXString
Formatted entity reference string
formatMDXSpecifiedByLink()β
function formatMDXSpecifiedByLink(url): MDXString;
Defined in: honkit/index.ts:162
Formats a "specified by" link as plain text with the raw URL. HonKit does not render custom JSX components.
Parametersβ
urlβ
string
URL to the specification
Returnsβ
MDXString
Formatted specification text string