Build
คำสั่งพื้นฐาน
# สร้าง static site ลงในโฟลเดอร์ build/
genwebblog build
# สร้างสำหรับภาษาเฉพาะ
genwebblog build-lang en
ค่า output จะถูกวางลงใน build/
(โดย default) และสำหรับภาษาที่ไม่ใช่ดีฟอลต์ จะสร้างโฟลเดอร์เช่น build/en/
Deployment
GenWebBlog รองรับการ deploy ไปยัง GitHub และ Cloudflare (Pages) ผ่านการตั้งค่าใน app.toml
ตัวอย่างการตั้งค่า GitHub ใน app.toml
:
[deploy_github]
user = "your-github-user"
repo_name = "your-repo"
token = "your-token"
branch = "main"
Cloudflare Pages:
[deploy_cloudflare]
account_id = "..."
api_token = "..."
project_name = "..."
Deploy commands
# Mock/test deploy
genwebblog deploy test
# Deploy to production
genwebblog deploy
ข้อแนะนำก่อน deploy
- ตรวจสอบว่า
app.toml
มีapp_domain
และ token ที่ถูกต้อง - สร้าง branch สำหรับ deploy ถ้าจำเป็น และตั้งค่าใน
app.toml
ให้ชัดเจน