使用Next.js的GitHub克隆
-> Next.js第1章项目以克隆编码开始
执行
next build
next start
你学到什么
Next.js项目结构
添加到页面文件夹的页面将路由到文件名。
_应用程序_app是适用于所有页面的组件,样式和布局可以全局应用。
_文档
_document负责基本的html模板。 (替换公用文件夹中的index.html。)
_document利用类组件并继承next/document Document 。
_document正文中必须包含<Main>和<NextScript> 。
404 如果找不到该页面,则显示404.js页面。
500 发生服务器错误时,将显示_error.js页面。
评论0
最新资源