Debian Codegraph @

docs/content/en/commands/hugo.md

raw
1 ---
2 title: "hugo"
3 slug: hugo
4 url: /commands/hugo/
5 ---
6 ## hugo
7
8 Build your project
9
10 ### Synopsis
11
12 hugo is the main command, used to build your Hugo project.
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
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 hugo.yaml|json|toml)
34 --configDir string config dir (default "config")
35 -c, --contentDir string filesystem path to content directory
36 -d, --destination string filesystem path to write files to
37 --disableKinds strings disable different kind of pages (home, RSS etc.)
38 --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
39 -e, --environment string build environment
40 --forceSyncStatic copy all files when static is changed.
41 --gc enable to run some cleanup tasks (remove unused cache files) after the build
42 -h, --help help for hugo
43 --ignoreCache ignore the configured file caches
44 --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
45 -l, --layoutDir string filesystem path to layout directory
46 --logLevel string log level (debug|info|warn|error)
47 --minify minify any supported output format (HTML, XML etc.)
48 --noBuildLock don't create .hugo_build.lock file
49 --noChmod don't sync permission mode of files
50 --noTimes don't sync modification time of files
51 --panicOnWarning panic on first WARNING log
52 --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
53 --printI18nWarnings print missing translations
54 --printMemoryUsage print memory usage to screen at intervals
55 --printPathWarnings print warnings on duplicate target paths etc.
56 --printUnusedTemplates print warnings on unused templates.
57 --quiet build in quiet mode
58 --renderSegments strings named segments to render (configured in the segments config)
59 -M, --renderToMemory render to memory (mostly useful when running the server)
60 -s, --source string filesystem path to read files relative from
61 --templateMetrics display metrics about template executions
62 --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
63 -t, --theme strings themes to use (located in /themes/THEMENAME/)
64 --themesDir string filesystem path to themes directory
65 --trace file write trace to file (not useful in general)
66 -w, --watch watch filesystem for changes and recreate as needed
67 ```
68
69 ### SEE ALSO
70
71 * [hugo build](/commands/hugo_build/) - Build your project
72 * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
73 * [hugo config](/commands/hugo_config/) - Display project configuration
74 * [hugo convert](/commands/hugo_convert/) - Convert front matter to another format
75 * [hugo deploy](/commands/hugo_deploy/) - Deploy your project to a cloud provider
76 * [hugo env](/commands/hugo_env/) - Display version and environment info
77 * [hugo gen](/commands/hugo_gen/) - Generate documentation and syntax highlighting styles
78 * [hugo import](/commands/hugo_import/) - Import a project from another system
79 * [hugo list](/commands/hugo_list/) - List content
80 * [hugo mod](/commands/hugo_mod/) - Manage modules
81 * [hugo new](/commands/hugo_new/) - Create new content
82 * [hugo server](/commands/hugo_server/) - Start the embedded web server
83 * [hugo version](/commands/hugo_version/) - Display version