Awwwards 登陸頁面
一個令人驚豔的作品集登陸頁面,具備使用 Locomotive Scroll、GSAP 和 Framer Motion 的平滑滾動動畫。
技術棧
- 框架:Next.js
- 動畫:Locomotive Scroll、GSAP、Framer Motion
- 套件管理器:pnpm 或 npm
- 開發連接埠:3000
設定
1. 複製模板
git clone --depth 1 https://github.com/Eng0AI/awwwards-landing-page-template.git .
如果目錄非空:
git clone --depth 1 https://github.com/Eng0AI/awwwards-landing-page-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. 移除 Git 歷史記錄(選擇性)
rm -rf .git
git init
3. 安裝相依套件
npm install
建置
npm run build
部署
重要:在 Vercel 上,你必須使用
vercel build --prod再執行vercel deploy --prebuilt --prod。切勿直接使用vercel --prod。
Vercel(建議)
vercel pull --yes -t $VERCEL_TOKEN
vercel build --prod -t $VERCEL_TOKEN
vercel deploy --prebuilt --prod --yes -t $VERCEL_TOKEN
Netlify
netlify deploy --prod
開發
npm run dev
備註
- 靜態 Next.js 網站 – 不需要環境變數
- 請勿在虛擬機器環境中執行
npm run dev