nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Page exclusion from docs

Open matteofrana opened this issue 3 years ago • 6 comments

Hi Shu, I'd like to have the docs root in /pages/docs, but have a content site in the /pages root folder. So I'd like to have a way to exclude pages from the docs navigation or set the documentation root folder.

What do you think? Matteo

matteofrana avatar Dec 16 '20 09:12 matteofrana

I am interested in this feature as well...is there currently a way to accomplish this?

davehorton avatar Apr 03 '21 00:04 davehorton

Yeah this will be an important feature to support (setting project root).

shuding avatar Apr 03 '21 10:04 shuding

Is this a change in nextra, or in next itself? I would be happy to take a shot at making the change if you could point me in the right direction...

davehorton avatar Apr 03 '21 13:04 davehorton

It seems like you might be able to add an extra config option or use the path config option to determine which files/directories to generate the pageMap.

https://github.com/shuding/nextra/blob/core/packages/nextra-theme-docs/src/index.js#L174

kitajchuk avatar Apr 03 '21 19:04 kitajchuk

does anyone know how to set a docs root right now?

talentlessguy avatar Sep 07 '21 15:09 talentlessguy

has anyone managed to solve this?

mattvb91 avatar Nov 25 '22 08:11 mattvb91

You can deploy your application as a sub-path in nextjs. Learn more: https://nextjs.org/docs/api-reference/next.config.js/basepath

There should be a way to set up the rewrites in next.config, I don't know how to.

carlbrn avatar Mar 13 '23 11:03 carlbrn

Need this!

NasirAbdullahSyed avatar Oct 27 '23 06:10 NasirAbdullahSyed