shuding / nextra

Simple, powerful and flexible site generation framework with everything you love from Next.js.
https://nextra.site
MIT License
11.7k stars 1.27k forks source link

Feedback for “Nextra Docs Theme” #2192

Open SamuelBarbier opened 1 year ago

SamuelBarbier commented 1 year ago

Hello, is it possible to have several documentation pages and to have them accessible from the top bar (next to about | contact | search? Because all I can do for the moment is to get all my md pages from "my project" and I would like to have different pages. Thanks for your help

guilherssousa commented 1 year ago

Let me see if I understood correctly, you want your doc pages to appear on the Navbar alongside contents, right? To do this you can add "type": "page" on your _meta.json

Example

{
  "index": {
    "title": "Home",
    "type": "page"  // Index will appear on top bar
  },
  "frameworks": {
    "title": "Frameworks",
  },
  "fruits": {
    "title": "Fruits",
  },
  "about": {
    "title": "About",
  }
}

If you want all pages to appear this way, you can use fallbacks to define it:

{
  "*": {
    "type": "page"
  },
}

More info

Navbar Items - Page Configuration