0

我有一个文件夹结构NextJs

pages
├── blog
│   ├── index.jsx
│   ├── other.jsx
│   └── [slug].jsx
└── index.js

npx next build && npx next export得到

├── 404.html
├── blog
│   ├── a1.html
│   ├── b2.html
│   ├── c3.html
│   └── other.html
├── blog.html
└── index.html

我希望它尊重我的内容结构并生成以下树

├── 404.html
├── blog
│   ├── index.html
│   ├── a1.html
│   ├── b2.html
│   ├── c3.html
│   └── other.html
└── index.html

注意如何pages/blog/index.jsx导出./blog.html而不是预期./blog/index.html

如何防止默认并以预期格式生成?

PS:整个网站是静态的,并且是在和的帮助下生成getStaticPropsgetStaticPaths

4

0 回答 0