1. 打开文件夹
cd helion可使用解压后的模板目录或你克隆的仓库。
快速开始
cd helion可使用解压后的模板目录或你克隆的仓库。
bun install因为本模板自带 bun.lock,所以推荐使用 Bun。
bun dev服务启动后,打开 http://localhost:3000 即可访问。
包管理器
本模板优先支持 Bun。如果切换到 npm、pnpm 或 Yarn,请删除 node_modules,并避免在同一项目中提交多个 lockfile。
bun install
bun dev
bun run build
bun run lintnpm install
npm run dev
npm run build
npm run lintpnpm install
pnpm dev
pnpm build
pnpm lintyarn install
yarn dev
yarn build
yarn lint项目脚本
dev用 Next.js 启动本地开发服务器。
build生成可发布的生产构建。
start构建成功后启动生产服务器。
lint对项目运行 ESLint 检查。
定制
所有路由都位于 app 目录下。修改首页请编辑 app/page.tsx,其他页面对应 app/product/page.tsx、app/careers/page.tsx 等。
app/*/page.tsx导航与页脚是共享组件。链接、文案、CTA 跳转与页脚分区都在这里维护。
app/site-header.tsx, app/site-footer.tsx行业卡片与详情页是数据驱动的。标题、描述、指标与路由别名都在这两个文件中维护。
app/industries/industry-data.ts, app/industries/detail-content.ts静态资源由 public 目录提供。生产图片尽量使用 WebP,让模板更轻量。
public/HeroUI 主题变量、基础颜色与 Tailwind 引入都在全局样式中。
app/globals.css路由
升级指南
Next.js 16 需要 Node.js 20.9 或更高,以及 TypeScript 5.1 或更高。请小步升级,每次升级后都跑 lint 与 build,发布大版本前务必阅读官方发布说明。
node -v
bun -v
bun outdatedbun update
bun run lint
bun run buildbun add next@latest react@latest react-dom@latest
bun add -d @types/react@latest @types/react-dom@latest
bun run lint
bun run buildbunx @next/codemod@canary upgrade latest
bun run lint
bun run buildnpm outdated
npm install next@latest react@latest react-dom@latest @heroui/react@latest @heroui/styles@latest
npm install -D @types/react@latest @types/react-dom@latest typescript@latest eslint@latest eslint-config-next@latest tailwindcss@latest @tailwindcss/postcss@latest
npm run lint
npm run build进行大版本升级时,建议使用独立的 git 分支。升级前先提交一次,再运行官方 codemod,修复警告,最后在浏览器中逐一验证每个路由。
部署
生产构建是最后的质量关。把模板上架到市场或部署到托管平台之前,请先修掉 lint、类型、图片与路由相关的问题。
bun run lint
bun run build
bun start官方链接