Gatsby

ดีพลอยแอป Gatsby ของคุณ

Gatsby has been a static-site generator from the start, and gatsby build has written to the same public folder for years. Nothing unusual here — build it, deploy it.

steps
  1. 01

    Build the site

    Run "gatsby build" (or "npm run build", which calls the same thing). Gatsby pre-renders every page and writes optimized static output to "public".

  2. 02

    Skip develop mode

    "gatsby develop" starts a live-reloading dev server on its own port — it's not what produces deployable output. You want "build", not "develop".

  3. 03

    ดีพลอยมัน

    รัน "npx harvis deploy public" จาก root ของโปรเจกต์คุณ ไม่ต้องตั้งค่าและไม่ต้องล็อกอินสำหรับการดีพลอยครั้งแรกนี้ — คุณจะได้ URL ใช้งานจริงทันที พร้อมลิงก์ claim ส่วนตัวเพื่อผูกไซต์เข้ากับบัญชีฟรีเมื่อคุณพร้อม

ดีพลอย Gatsby ด้วยคำสั่งเดียว

Build โปรเจกต์ของคุณ แล้วส่งโฟลเดอร์ output ให้ harvis ไม่ต้องมีบัญชีสำหรับการดีพลอยครั้งแรก — คุณจะได้ลิงก์ใช้งานจริงและลิงก์ claim ส่วนตัวเพื่อจัดการภายหลัง

terminal
gatsby build
npx harvis deploy public

อยากลากไฟล์แทนเทอร์มินัลไหม? Build โปรเจกต์แล้ว วางโฟลเดอร์ output ที่นี่ แล้วเผยแพร่แบบเดียวกัน

คำถามเกี่ยวกับการดีพลอย Gatsby

My Gatsby site pulls data from a CMS. Does that still work after deploying?

Yes, as long as the data fetching happens at build time through Gatsby's GraphQL data layer, which is the normal Gatsby pattern. The page is already fully rendered with that data baked in by the time gatsby build finishes — nothing needs to run at request time.

Do Gatsby's dynamic routes and client-only paths work?

Pages generated via createPages at build time work fine — they're plain files in public. Client-only routes (Reach Router matchPath) render in the browser after the shell loads, and harvis's fallback to your entrypoint HTML handles the direct-visit case.

การดีพลอยแอป Gatsby ไปยัง harvis ฟรีจริงไหม?

ใช่ ไม่ต้องใช้บัตรเครดิต ขีดจำกัดฟรีคือ 500 ไฟล์และ 50 MB ต่อไซต์ ซึ่งเพียงพอมากสำหรับ static build ของ Gatsby ไซต์ที่เผยแพร่แล้วไม่มีวันหมดอายุ — จะออนไลน์อยู่จนกว่าคุณจะลบมัน

ฉันใช้โดเมนของตัวเองกับไซต์ Gatsby ที่ดีพลอยแล้วได้ไหม?

ทุกไซต์จะได้ที่อยู่ harvis.dev ฟรี และคุณเลือก subdomain ของตัวเองจากแดชบอร์ดได้หลังจาก claim — my-app.harvis.dev แทนที่จะเป็นชื่อสุ่ม การชี้โดเมนที่คุณเป็นเจ้าของอยู่แล้ว (เช่น mystore.com) มาที่ไซต์ยังไม่รองรับในตอนนี้

สิ่งนี้ต่างจากการดีพลอย Gatsby ไปยัง Vercel หรือ Netlify อย่างไร?

Vercel และ Netlify สร้างขึ้นรอบการเชื่อมต่อ Git repo แล้วรัน build บนเซิร์ฟเวอร์ของพวกเขา พร้อมแดชบอร์ดสำหรับตั้งค่า harvis ข้ามขั้นตอนเหล่านั้นทั้งหมด: คุณ build ในเครื่อง (หรือใน CI ของคุณเอง) รันคำสั่ง CLI เดียวกับโฟลเดอร์ output แล้วได้ลิงก์กลับมา — ไม่ต้องตั้งค่าโปรเจกต์ และไม่ต้องมีบัญชีจนกว่าคุณจะอยากเก็บไซต์ไว้

other frameworks

กำลังดีพลอยอย่างอื่นอยู่?

สูตรเดียวกันทุกที่ — build แล้ว npx harvis deploy โฟลเดอร์ output