hugo.md (4728B)
1 ---
2 title: "hugo"
3 slug: hugo
4 url: /commands/hugo/
5 ---
6 ## hugo
7
8 hugo builds your site
9
10 ### Synopsis
11
12 hugo is the main command, used to build your Hugo site.
13
14 Hugo is a Fast and Flexible Static Site Generator
15 built with love by spf13 and friends in Go.
16
17 Complete documentation is available at https://gohugo.io/.
18
19 ```
20 hugo [flags]
21 ```
22
23 ### Options
24
25 ```
26 -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
27 -D, --buildDrafts include content marked as draft
28 -E, --buildExpired include expired content
29 -F, --buildFuture include content with publishdate in the future
30 --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
31 --cleanDestinationDir remove files from destination not found in static directories
32 --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
33 --config string config file (default is path/config.yaml|json|toml)
34 --configDir string config dir (default "config")
35 -c, --contentDir string filesystem path to content directory
36 --debug debug output
37 -d, --destination string filesystem path to write files to
38 --disableKinds strings disable different kind of pages (home, RSS etc.)
39 --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
40 -e, --environment string build environment
41 --forceSyncStatic copy all files when static is changed.
42 --gc enable to run some cleanup tasks (remove unused cache files) after the build
43 -h, --help help for hugo
44 --ignoreCache ignores the cache directory
45 --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
46 -l, --layoutDir string filesystem path to layout directory
47 --log enable Logging
48 --logFile string log File path (if set, logging enabled automatically)
49 --minify minify any supported output format (HTML, XML etc.)
50 --noBuildLock don't create .hugo_build.lock file
51 --noChmod don't sync permission mode of files
52 --noTimes don't sync modification time of files
53 --panicOnWarning panic on first WARNING log
54 --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
55 --printI18nWarnings print missing translations
56 --printMemoryUsage print memory usage to screen at intervals
57 --printPathWarnings print warnings on duplicate target paths etc.
58 --printUnusedTemplates print warnings on unused templates.
59 --quiet build in quiet mode
60 --renderToMemory render to memory (only useful for benchmark testing)
61 -s, --source string filesystem path to read files relative from
62 --templateMetrics display metrics about template executions
63 --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
64 -t, --theme strings themes to use (located in /themes/THEMENAME/)
65 --themesDir string filesystem path to themes directory
66 --trace file write trace to file (not useful in general)
67 -v, --verbose verbose output
68 --verboseLog verbose logging
69 -w, --watch watch filesystem for changes and recreate as needed
70 ```
71
72 ### SEE ALSO
73
74 * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
75 * [hugo config](/commands/hugo_config/) - Print the site configuration
76 * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
77 * [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a Cloud provider.
78 * [hugo env](/commands/hugo_env/) - Print Hugo version and environment info
79 * [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
80 * [hugo import](/commands/hugo_import/) - Import your site from others.
81 * [hugo list](/commands/hugo_list/) - Listing out various types of content
82 * [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
83 * [hugo new](/commands/hugo_new/) - Create new content for your site
84 * [hugo server](/commands/hugo_server/) - A high performance webserver
85 * [hugo version](/commands/hugo_version/) - Print the version number of Hugo
86