Updated Oct 19, 2026

Utilities

Build a local Hugo site into static files

hugo-build is a local static-site builder using the standard Hugo binary.

Agent

overview

What hugo-build does

Build a local Hugo site into a static output folder using the standard Hugo binary. Network fetching and external commands are disabled; source files are preserved.

Render local content, layouts and static assets with standard Hugo 0.167.0. The node builds a temporary source copy and returns the completed site folder. Themes and dependencies must already be local or vendored; it starts no server and performs no deployment.

Input and completed output are limited to 100 MiB, 10000 files, 20000 entries and 32 directory levels. The process has a 120-second timeout and 16 MiB log cap. Symlinks and special files are rejected. Native security overrides disable HTTP, executables, template environment access, inline shortcodes and Go module fetching. Output size is checked before returning artifacts; build-time growth still depends on worker disk.

Packaged version: 0.167.0. Upstream license: Apache-2.0.

source github.com/gohugoio/hugo/tree/3fff6fb5c267dacb26280c78dbe8c344054249c8

use cases

Where hugo-build fits

Build supplied content and layouts

Render a local site with its own templates.

Keep static assets with the output

Receive copied static files alongside generated pages.

Check a self-contained site build

Detect unsupported external dependencies before a separate deployment stage.

reference

hugo-build inputs and flags

1 inputs
NameTypeFlagDescription
sourceFOLDER--sourceLocal Hugo site root including config, content and layouts; dependencies must be local or vendored. At most 100 MiB and 10000 files, no symlinks.

Showing key inputs. hugo-build exposes 1 inputs in total.

example

Run hugo-build

hugo-build · command
node /app/run.mjs --source ./source ./output

guidance

Choosing hugo-build

Use hugo-build for a self-contained Hugo project. Extended-only features, remote modules, PostCSS, Node tools and Sass executables are unavailable. A single-file Markdown converter produces a fragment instead of building this complete site structure.

faq

hugo-build questions

source: Local Hugo site root including config, content and layouts; dependencies must be local or vendored. At most 100 MiB and 10000 files, no symlinks.

Render local content, layouts and static assets with standard Hugo 0.167.0. The node builds a temporary source copy and returns the completed site folder. Themes and dependencies must already be local or vendored; it starts no server and performs no deployment.

Input and completed output are limited to 100 MiB, 10000 files, 20000 entries and 32 directory levels. The process has a 120-second timeout and 16 MiB log cap. Symlinks and special files are rejected. Native security overrides disable HTTP, executables, template environment access, inline shortcodes and Go module fetching. Output size is checked before returning artifacts; build-time growth still depends on worker disk.

Use hugo-build for a self-contained Hugo project. Extended-only features, remote modules, PostCSS, Node tools and Sass executables are unavailable. A single-file Markdown converter produces a fragment instead of building this complete site structure.

The public image repository gives immutable image and ORAS download commands, the expected source/notices bundle checksum and pinned upstream source directions. The accompanying OCI bundle retains the original build recipe, runtime sources and full installed notices. The Git recipe keeps primary notices and an exact layer/hash index; it does not duplicate the full installed notice tree or mirror every upstream source archive. Image, source and license notice downloads.

Run hugo-build yourself

The saved synthetic verifier confirmed rendered Markdown, expanded title/template content and a copied static asset, with 250 HTML bytes. The complete rendered site was not retained as a page example. The command shows the container entrypoint with example paths.

Facts on this page come from the live Trickest tool library.