Skip to content

Hugo

Deploy a Hugo site to LeafCloud.

Validated with Hugo v0.168.0 extended. No special configuration change is required; Hugo builds static HTML into the public directory by default.

  1. Create a Hugo project:

    Terminal window
    hugo new site <project> < /dev/null
    Terminal window
    cd <project>
  2. 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>
  3. Preview the deployment:

    Terminal window
    leaf deploy --dry-run

    Expected output:

    Framework: Hugo
    Package manager: none
    Build command: hugo
    Output directory: public
    Files: 5
    Total size: 1922 bytes
    Dry run: nothing was uploaded.

    A real deploy prints ✓ Live at <url> (<files> files, <uploaded> uploaded) instead of the final dry-run line.

Hugo; hugo; public.

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.

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.