Hugo
Deploy a Hugo site to LeafCloud.
Requirements
Section titled “Requirements”Validated with Hugo v0.168.0 extended. No special configuration change is required; Hugo builds static HTML into the public directory by default.
-
Create a Hugo project:
Terminal window hugo new site <project> < /dev/nullTerminal window cd <project> -
Add a template or layout so Hugo generates HTML. For a minimal setup, create
layouts/index.html:<!DOCTYPE html><html><head><title>Hugo Site</title></head><body><h1>Hello from Hugo</h1></body></html> -
Preview the deployment:
Terminal window leaf deploy --dry-runExpected output:
Framework: HugoPackage manager: noneBuild command: hugoOutput directory: publicFiles: 5Total size: 1922 bytesDry run: nothing was uploaded.A real deploy prints
✓ Live at <url> (<files> files, <uploaded> uploaded)instead of the final dry-run line.
What LeafCloud detects
Section titled “What LeafCloud detects”Hugo; hugo; public.
Common problems
Section titled “Common problems”No Hugo-specific refusal was captured in validation. If the output directory contains no files, ensure your site has a theme or a template under layouts/ that produces public/index.html.
For agents
Section titled “For agents”Run leaf deploy --dry-run --json first.
Check the exit code and stop if the JSON contains "error".
After a successful dry run, run leaf deploy --json --yes.
Never print credentials.
Validated on 2026-10-23 with Hugo v0.168.0.