Communitygithub.com

guibean/site-estatico

建立與演進登陸頁面、企業網站、作品集與部落格,使用 guibean/nextjs-template 模板。當需求不需要登入、資料庫或自訂後端時使用。

site-estatico 是什麼?

此技能專為僅需靜態前端(無登入、資料庫或自訂後端)的網站需求而設計,適合 Landing Page、企業官網、活動頁面、作品集或部落格。它基於 guibean/nextjs-template 建立 Next.js 專案,輸出為純 HTML/CSS/JS 並部署到 Cloudflare Pages。強烈建議不要將其用於需要後端邏輯(如登入、付款、上傳、管理面板)的專案,這類情況應使用 `sistema-fullstack` 技能。工作流程包含克隆模板、設定環境變數、依需求安裝元件(shadcn、Aceternity)、確保無效的 SEO 與可存取性、並通過 Lighthouse ≥95 檢查後,再執行 Cloudflare Pages 部署。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/guibean/nextjs-fullstack-template/tree/main/.opencode/skills/site-estatico

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Site Estático Next.js

使用時機

用於登陸頁面、企業網站、活動頁面、作品集或部落格。結果僅為前端,導出為 HTML/CSS/JS 並發布於 Cloudflare Pages。

不要使用當有登入、註冊、資料庫、管理面板、收費、上傳或自訂 API 時。這些情況請使用 sistema-fullstack 技能。

建立專案

  1. 確認名稱、最終域名、頁面目標以及是否有聯絡表單。
  2. 使用靜態網站儲存庫:
git clone https://github.com/guibean/nextjs-template.git <slug>
cd <slug>
git remote remove origin
git remote add origin https://github.com/guibean/<slug>.git
  1. 從 .env.example 建立 .env.local 並填入 NEXT_PUBLIC_SITE_URL、名稱、作者與電子郵件。
  2. 執行 pnpm install、pnpm lint、pnpm typecheck 和 pnpm build。
  3. 只有到此時才能修改內容。

規則

  • 不要新增後端依賴。
  • 按需安裝 shadcn 元件:
pnpm exec shadcn add dialog
pnpm exec shadcn add @aceternity/spotlight
  • 對於 Aceternity 區塊,請檢查授權,並僅在組件需要時安裝 motion。
  • 每頁僅保留一個 h1,並維持標題層級結構。
  • 每新增頁面都需要 createMetadata、sitemap 條目和可導航的連結。
  • 使用 next/image 搭配 sizes,並透過 pnpm images 處理圖片。
  • 在此配置中,不要使用 output: "server"、Server Actions 或 Next API Routes。
  • 表單:保留 Turnstile + functions/api/contact.ts + Resend。

交付前檢查清單

請閱讀 references/seo-checklist.md 並確認:

  • metadata、canonical、Open Graph 和 robots
  • sitemap 包含所有公開頁面
  • llms.txt 已更新
  • 圖片已產生於 assets/images/ 和 public/images/
  • 一個 h1、對比度、可見焦點和鍵盤導航
  • 外部連結含有適當的 rel
  • pnpm lint、pnpm typecheck、pnpm build 通過
  • Lighthouse 四項類別均 ≥ 95
  • 若有表單/分析工具,則隱私政策已更新

部署到 Cloudflare Pages

  • Build command: pnpm build
  • Output directory: out
  • Node: 24
  • 公開變數在建構時設定,秘密變數在 Functions 中設定
  • 在 NEXT_PUBLIC_SITE_URL、TURNSTILE_HOSTNAME 和 CONTACT_ALLOWED_ORIGIN 中設定域名

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

相關技能