Live demo: https://chenyuanqu.com/NextJS-Project-Page
Next.js (App Router) + Tailwind v4 template for research project pages. Edit data/project.ts and swap assets in public/ to make it yours.
- Visual Split: https://chenyuanqu.com/VisualSplit/
- Next.js 15 App Router with static export to
out/ - Tailwind CSS v4 + Geist via
next/font - Single-source content in
data/project.ts - GitHub Pages-ready: basePath config + deploy workflow included
cd project_page_template
npm install
npm run dev
# open http://localhost:3000-
Edit
data/project.ts:- Update
meta,authors,affiliations,links. - Replace text blocks (
introduction,contributions,methodCards,descriptorExplainer,experimentNote). - Swap media in
assets,otherModelOptions,editingModelOptions,histogramOptions. - Adjust
metricsTableandbibtex.
- Update
-
Replace assets:
- Drop new PNG/JPG/SVG/MP4 files into
public/. - Reference them with
asset("/images/..."); placeholders live underpublic/images/placeholders/.
- Drop new PNG/JPG/SVG/MP4 files into
-
Base path (for Pages):
- Set
repoNameinnext.config.tsto your repo name sobasePath/assetPrefixare correct.
- Set
-
Styling tweaks (optional):
- Edit
app/globals.cssand Tailwind classes inapp/page.tsx. - Swap fonts in
app/layout.tsxif you prefer another Google font.
- Edit
meta: title, tagline, venue, quoteauthors/affiliations: hero infolinks: paper/code/models/poster/BibTeX- Sections:
introduction,contributions,methodCards - Media:
descriptorExample,appAssets, sliders (otherModelOptions),metricsTable bibtex: citation block
npm run build # outputs static site to out/Host out/ on GitHub Pages or any static host (ensure paper/video/poster links are public).
- Fork to your own repo/branch; go to Settings > Pages, set Build and deployment source to GitHub Actions, and every push auto-deploys.
- Workflow steps: checkout; detect package manager + caches; setup Node 20; install deps; set
NEXT_PUBLIC_BASE_PATHto/${{ github.event.repository.name }}; runnext build(static export); uploadout/;deploy-pages.
- Images break when deployed under a subpath (e.g., GitHub Pages): either set
NEXT_PUBLIC_BASE_PATH="/<your-repo-name>"(CI sets this automatically) or setrepoNameinnext.config.ts, then rebuild and redeploy sobasePath/assetPrefixare correct. - Local dev works but Pages is blank/404: confirm Settings > Pages uses GitHub Actions as the source and that the latest workflow run succeeded.
- Deploying at the domain root instead of a subfolder: set
repoNameto an empty string (or removebasePath/assetPrefix), rebuild, and redeploy.