ដេប្លយកម្មវិធី Hugo របស់អ្នក
Hugo builds a full site in well under a second and writes it to public — there's genuinely not much more to say. It was static-first before that was the default expectation.
- 01
Build the site
Run "hugo" from your project root. It compiles every content file and template into static HTML, CSS, and JS in a "public" folder — usually in well under a second.
- 02
Set the right base URL
Hugo bakes "baseURL" from hugo.toml into every generated link. Set it to your harvis.dev address before building, or links to other pages on the site will point at the wrong place.
- 03
ដេប្លយវា
ដំណើរការ "npx harvis deploy public" ពី root គម្រោងរបស់អ្នក។ មិនចាំបាច់ config និងមិនចាំបាច់ចូលសម្រាប់ deploy ដំបូងនេះទេ — អ្នកទទួលបាន URL ផ្ទាល់ភ្លាមៗ ព្រមទាំងតំណទាមទារឯកជនមួយ ដើម្បីភ្ជាប់គេហទំព័រទៅគណនីឥតគិតថ្លៃមួយនៅពេលណាដែលអ្នកត្រៀមខ្លួនរួចរាល់។
ដេប្លយ Hugo ដោយពាក្យបញ្ជាតែមួយ
Build គម្រោងរបស់អ្នក រួចប្រគល់ថតលទ្ធផលទៅ harvis។ មិនចាំបាច់មានគណនីសម្រាប់ deploy ដំបូងទេ — អ្នកនឹងទទួលបានតំណភ្ជាប់ផ្ទាល់ និងតំណទាមទារឯកជនមួយ ដើម្បីគ្រប់គ្រងវានៅពេលក្រោយ។
hugo npx harvis deploy public
ចង់អូសឯកសារជំនួសឱ្យប្រើ terminal មែនទេ? Build គម្រោង រួច ទម្លាក់ថតលទ្ធផលនៅទីនេះ ហើយផ្សព្វផ្សាយវាតាមរបៀបដដែល។
សំណួរអំពីការដេប្លយ Hugo
I changed baseURL after already deploying. Do I need to redeploy?
Yes — baseURL is compiled into the HTML at build time, not read at request time. Update "hugo.toml", rebuild, and run "npx harvis deploy public" again; it updates the same site.
Does Hugo's pagination and taxonomy pages (tags, categories) work?
Yes — they're all generated as static HTML files at build time like every other Hugo page, so they deploy and serve exactly the same way.
តើការដេប្លយកម្មវិធី Hugo ទៅ harvis ឥតគិតថ្លៃពិតប្រាកដមែនទេ?
បាន មិនចាំបាច់ប្រើកាតទេ។ ដែនកំណត់ឥតគិតថ្លៃគឺឯកសារ ៥០០ និង ៥០ MB ក្នុងមួយគេហទំព័រ ដែលគ្រប់គ្រាន់សម្រាប់ build Hugo static ដោយមានទំហំគ្រប់គ្រាន់។ គេហទំព័រដែលបានផ្សព្វផ្សាយមិនផុតកំណត់ទេ — ពួកវានៅតែដំណើរការរហូតដល់អ្នកលុបពួកវាចេញ។
តើខ្ញុំអាចប្រើ domain ផ្ទាល់ខ្លួនរបស់ខ្ញុំជាមួយគេហទំព័រ Hugo ដែលបានដេប្លយបានទេ?
គេហទំព័រនីមួយៗទទួលបានអាសយដ្ឋាន harvis.dev ឥតគិតថ្លៃមួយ ហើយអ្នកអាចជ្រើសរើស subdomain ផ្ទាល់ខ្លួនរបស់អ្នកពី dashboard បន្ទាប់ពីទាមទារវា — ដូចជា my-app.harvis.dev ជំនួសឱ្យអាសយដ្ឋានចៃដន្យ។ ការចង្អុល domain ដែលអ្នកមានស្រាប់ (ដូចជា mystore.com) ទៅកាន់គេហទំព័រនេះមិនទាន់អាចធ្វើបានទេនៅឡើយ។
តើវាខុសពីការដេប្លយ Hugo ទៅ Vercel ឬ Netlify យ៉ាងដូចម្តេច?
Vercel និង Netlify ត្រូវបានបង្កើតឡើងជុំវិញការភ្ជាប់ Git repo និងដំណើរការ build របស់អ្នកនៅលើ server របស់ពួកគេ ជាមួយ dashboard មួយសម្រាប់កំណត់រចនាសម្ព័ន្ធ។ harvis រំលងអ្វីៗទាំងនោះទាំងអស់៖ អ្នក build នៅមូលដ្ឋាន (ឬនៅក្នុង CI ផ្ទាល់ខ្លួនរបស់អ្នក) ដំណើរការពាក្យបញ្ជា CLI តែមួយប្រឆាំងនឹងថតលទ្ធផល រួចទទួលបានតំណភ្ជាប់មួយ — មិនចាំបាច់រៀបចំគម្រោង និងមិនចាំបាច់មានគណនីទេ រហូតដល់អ្នកចង់រក្សាគេហទំព័រនោះ។
កំពុងដេប្លយអ្វីផ្សេងទៀតមែនទេ?
រូបមន្តដូចគ្នាគ្រប់ទីកន្លែង — build វា រួច npx harvis deploy លទ្ធផល។