docsify
Docsify formatter for GraphQL documentation output.
Builds on the Hugo preset (GitHub-style > [!TYPE] callouts, which Docsify
v5 renders natively) and adapts the output to Docsify:
- no front matter (Docsify would print it as text), only a
# Titleheading; - internal links are root-absolute
/<path>.mdroutes; - every category folder gets a
README.md(Docsify's folder index); - a
_sidebar.mdis generated at the docs root once all pages are written.
afterRenderFilesHook
const afterRenderFilesHook: RenderFilesHook;
Defined in: docsify/index.ts:163
Builds _sidebar.md and completes every folder README.md once all pages
have been written.
Param
event
Hook event with baseURL, outputDir, rootDir, pages and outputAdapter
beforeGenerateIndexMetafileHook
const beforeGenerateIndexMetafileHook: GenerateIndexMetafileHook;
Defined in: docsify/index.ts:116
Seeds the Docsify folder index (README.md) of a category directory.
It is completed with the page links by afterRenderFilesHook.
Param
event
Hook event whose data contains dirPath and category
mdxExtension
const mdxExtension: ".md";
Defined in: docsify/index.ts:41
File extension used for generated pages.
createMDXFormatter()
function createMDXFormatter(_meta?): Formatter;
Defined in: docsify/index.ts:97
Creates a Docsify formatter.
Parameters
_meta?
Maybe<MetaInfo>
Unused metadata parameter
Returns
Formatter
A complete Formatter implementation for Docsify output
formatMDXFrontmatter()
function formatMDXFrontmatter(_props, formatted): MDXString;
Defined in: docsify/index.ts:50
Docsify has no front matter support (it would print the YAML as text). Only the page title is kept, rendered as a level 1 heading.
Parameters
_props
Maybe<FrontMatterOptions>
Unused front matter options
formatted
Maybe<string[]>
Pre-formatted front matter lines produced by the printer
Returns
MDXString
A # Title heading, or an empty string when there is no title
formatMDXLink()
function formatMDXLink(link): TypeLink;
Defined in: docsify/index.ts:67
Turns internal links into root-absolute /<path>.md routes.
External links and #-only links are returned unchanged.
Parameters
link
TypeLink
Link data with text and URL
Returns
TypeLink
Link object with the Docsify route as URL