Utilities
Build a local Hugo site into static files
hugo-build is a local static-site builder using the standard Hugo binary.
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
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --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. |
Showing key inputs. hugo-build exposes 1 inputs in total.
example
Run hugo-build
node /app/run.mjs --source ./source ./outputguidance
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
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
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.