GraphQL-Markdown · mdBook Demo
This site is generated from a GraphQL schema using graphql-markdown with the mdBook formatter preset.
What this demo shows
- Frontmatter is suppressed — mdBook renders
---as literal content, so the formatter returns an empty string instead. - Admonitions fall back to blockquote style (
> **NOTE**) since mdBook has no native admonition syntax. - Links keep the
.mdextension — mdBook resolves them natively. - A
SUMMARY.mdis built after generation to wire all pages into the mdBook navigation.
Generation pipeline
npm run generateruns GraphQL-Markdown againstschema.graphql.- Pages are written to
src/graphql/using the mdBook formatter. src/SUMMARY.mdis rebuilt by scanning the output directory.mdbook serve/mdbook buildrenders the final site.
Key files
scripts/generate-docs.mjs— runs GraphQL-Markdown and rebuildsSUMMARY.md.scripts/custom-mdbook-mdx.mjs— wraps the mdBook formatter preset.schema.graphql— source GraphQL schema (countries API).book.toml— mdBook configuration.