hugo

Hugo builds your site

Subcommands

NameDescription
checkContains some verification checks
configPrint the site configuration
convertConvert your content to different formats
deployDeploy your site to a Cloud provider
envPrint Hugo version and environment info
genA collection of several useful generators
helpHelp about any command
importImport your site from others
listListing out various types of content
modVarious Hugo Modules helpers
newCreate new content for your site
serverA high performance webserver
versionPrint the version number of Hugo

Options

NameDescription
-h, --helphelp for hugo
-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)
--renderToMemoryRender to memory (only useful for benchmark testing)