跳到主要内容

nextra

  • 支持 SSG, SSR, ISR
  • 不支持 app layout #2023
    • 但 app 和 pages 可以共存
  • 暂不支持 turbopack #1054
  • Nextra 3 #1421
    • ESM only
  • /
    • theme.config.{jsx,tsx}
    • pages/
      • index.{md,mdx}
      • _meta.json
        • title 映射
        • 顺序

markdown

GFM

## 标题 [#title]

docs

theme.config.jsx

// https://nextra.site/docs/docs-theme/theme-configuration
export default {
logo: <span>My Nextra Documentation</span>,
project: {
link: 'https://github.com/wenerme/wener',
},
};

_meta.json

{
"index": {
"title": "Home",
"type": "page",
"theme": {
"layout": "raw",
"typesetting": "article",
"breadcrumb": false,
"footer": true,
"sidebar": false,
"toc": true,
"pagination": false
}
},
"contact": {
"display": "hidden"
},
"about": "About Us",
"github_link": {
"title": "Wener Github",
"href": "https://github.com/wenerme",
"newWindow": true
},
"company": {
"title": "Company",
"type": "menu",
"items": {
"about": {
"title": "About",
"href": "/about"
},
"contact": {
"title": "Contact Us",
"href": "mailto:[email protected]"
}
}
},
"*": {
"type": "page"
},
"---": {
"type": "separator"
}
}
  • typesetting - default, article
  • layout - raw, full