LinuxCommandLibrary

hugo-server

starts a local development server with live reload

TLDR

Start development server

$ hugo server
copy
With drafts
$ hugo server -D
copy
Custom port
$ hugo server -p [8080]
copy
Bind to all interfaces
$ hugo server --bind [0.0.0.0]
copy
Disable live reload
$ hugo server --disableLiveReload
copy
With polling
$ hugo server --poll [1000ms]
copy

SYNOPSIS

hugo server [options]

DESCRIPTION

hugo server starts a local development server with live reload. It watches for file changes and automatically rebuilds the site.
The server provides fast iteration during development. Live reload refreshes browsers automatically when content changes.

PARAMETERS

-D, --buildDrafts

Include draft posts.
-p, --port PORT
Server port.
--bind ADDR
Listen address.
--disableLiveReload
Disable live reload.
--poll DURATION
Use polling for changes.
-w, --watch
Watch for changes.
--help
Display help information.

CAVEATS

Development only. Not for production. Memory usage with large sites.

HISTORY

hugo server is the built-in development server for Hugo static site generator.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community