Blog

Change docs root path#

Dokz side nav shows all your pages paths by default, to only show files in a specific directory you can use the DokzProvider docsRootPath prop

Here is an example of a site that exposes only the mdx documents on the /docs/ directory

jsx
1
import { DokzProvider } from 'dokz'
2
import React from 'react'
3
4
export default function App(props) {
5
const { Component, pageProps } = props
6
return (
7
<DokzProvider docsRootPath='pages/docs'>
8
<Component {...pageProps} />
9
</DokzProvider>
10
)
11
}
Previous
Change Sidebar Ordering
Change docs root path