hugo server

A high performance webserver

Options

NameDescription
-h, --helphelp for server
-b, --baseURL <hostname and path>Hostname (and path) to the root, e.g. http://spf13.com/
-D, --buildDrafts <boolean>Include content marked as draft (default false)
-E, --buildExpired <boolean>Include expired content (default false)
-F, --buildFuture <boolean>Include content with publishdate in the future (default false)
--cacheDir <path>Filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--cleanDestinationDir <boolean>Remove files from destination not found in static directories (default false)
-c, --contentDir <path>Filesystem path to content directory
-d, --destination <path>Filesystem path to write files to
--disableKinds <kind,kind>Disable different kind of pages (home, RSS etc.)
--enableGitInfo <boolean>Add Git revision, date and author info to the pages (default false)
--forceSyncStatic <boolean>Copy all files when static is changed (default false)
--gc <boolean>Enable to run some cleanup tasks (remove unused cache files) after the build (default false)
--i18n-warnings <boolean>Print missing translations (default false)
--ignoreCache <boolean>Ignores the cache directory (default false)
-l, --layoutDir <path>Filesystem path to layout directory
--minify <boolean>Minify any supported output format (HTML, XML etc.) (default false)
--noChmod <boolean>Don't sync permission mode of files (default false)
--noTimes <boolean>Don't sync modification time of files (default false)
--path-warnings <boolean>Print warnings on duplicate target paths etc (default false)
--poll <milliseconds>Set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem <boolean>Print memory usage to screen at intervals (default false)
--templateMetrics <boolean>Display metrics about template executions (default false)
--templateMetricsHints <boolean>Calculate some improvement hints when combined with --templateMetrics (default false)
-t, --theme <theme name>Themes to use (located in /themes/THEMENAME/)
--trace <file>Write trace to file (not useful in general)
--config <file>Config file (default is path/config.yaml|json|toml)
--configDir <directory path>Config dir (default 'config')
--debug <boolean>Debug output (default false)
-e, --environment <environment>Build environment
--ignoreVendor <boolean>Ignores any _vendor directory (default false)
--ignoreVendorPaths <glob pattern>Ignores any _vendor for module paths matching the given Glob pattern
--log <boolean>Enable Logging (default false)
--logFile <file>Log File path (if set, logging enabled automatically)
--quiet <boolean>Build in quiet mode (default false)
-s, --source <file>Filesystem path to read files relative from
--themesDir <file>Filesystem path to themes directory
-v, --verbose <boolean>Verbose output (default false)
--verboseLog <boolean>Verbose logging (default false)
-w, --watch <boolean>Watch filesystem for changes and recreate as needed (default true)
--appendPort <boolean>Append port to baseURL (default true)
--bind <ip address>Interface to which the server will bind (default '127.0.0.1')
--disableBrowserError <boolean>Do not show build errors in the browser (default false)
--disableFastRender <boolean>Enables full re-renders on changes (default false)
--disableLiveReload <boolean>Watch without enabling live browser reload on rebuild (default false)
--liveReloadPort <port>Port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
--meminterval <time unit>Interval to poll memory usage (requires --memstats), valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'. (default '100ms')
--memstats <file>Log memory usage to this file
--navigateToChanged <boolean>Navigate to changed content file on live browser reload (default false)
--noHTTPCache <boolean>Prevent HTTP caching (default false)
-p, --port <port>Port on which the server will listen (default 1313)
--renderToDisk <boolean>Render to Destination path (default is false: render to memory & serve from there)