Browse the GraphQL schema documentation for this API.
Configuration#
This documentation is generated using GraphQL-Markdown with the Hugo formatter and custom lifecycle hooks for advanced customization.
Generation Pipeline#
The GraphQL-Markdown generation process uses three key components:
1. Hugo Formatter Preset - Provides base Markdown output optimized for Hugo:
.mdfile extension (not.mdx)- Plain Markdown compatible with Hugo’s Goldmark processor
- Badge rendering with CSS classes
2. Custom Lifecycle Hooks - Process documentation during generation:
beforeGenerateIndexMetafileHook- Creates section index files (_index.md)afterRenderTypeEntitiesHook- Adds navigation links and metadataformatMDXFrontmatter- Renders page titles as H1 headingsformatMDXBadge- Colors badges by type
3. Hugo Configuration - Enables HTML rendering:
[markup.goldmark.renderer] unsafe = true- Allows<span>tags for styled badges- Book theme integration - Provides sidebar navigation with automatic weight-based ordering
Key Files#
scripts/generate-docs.mjs- GraphQL-Markdown configuration and runnerscripts/custom-hugo-mdx.mjs- Custom formatter with lifecycle hooksdemo_schema.graphql- Shared GraphQL-Markdown demo schema, loaded from its URLhugo.toml- Hugo configurationstatic/css/gqlmd-badges.css- Badge stylinglayouts/_partials/docs/inject/head.html- CSS injection