This package generates/consumes a tree where nodes contain urls that serve markdown/MDX files. We refer to this as the URL tree.

The URL tree can be generated from a table of contents written in markdown, compatible with existing GitBooks. Utility functions are provided to reformat the URL tree to play well with Next.js functions getStaticPaths and getStaticProps so that you can serve all the files specified in your table of contents.


yarn add next-mdx-boooks
npm install next-mdx-books


We document the workings of this package on this page, but the best way to get started is to use the minimal example

npx create-next-app -e
# or
yarn create next-app -e This documentation site is also built using next-mdx-books, check it out on GitHub.