1HUGO-SERVER(1)                    Hugo Manual                   HUGO-SERVER(1)
2
3
4

NAME

6       hugo-server - A high performance webserver
7
8
9

SYNOPSIS

11       hugo server [flags]
12
13
14

DESCRIPTION

16       Hugo  provides  its  own  webserver  which  builds and serves the site.
17       While hugo server is high performance, it is a webserver  with  limited
18       options.   Many  run it in production, but the standard behavior is for
19       people to use it in development and use a  more  full  featured  server
20       such as Nginx or Caddy.
21
22
23       'hugo  server'  will  avoid  writing the rendered and served content to
24       disk, preferring to store it in memory.
25
26
27       By default hugo will also watch your files for any changes you make and
28       automatically  rebuild  the  site.  It  will  then live reload any open
29       browser pages and push the latest content to them. As most  Hugo  sites
30       are  built  in a fraction of a second, you will be able to save and see
31       your changes nearly instantly.
32
33
34

OPTIONS

36       --appendPort[=true]      append port to baseURL
37
38
39       -b,  --baseURL=""       hostname  (and  path)   to   the   root,   e.g.
40       https://spf13.com/
41
42
43       --bind="127.0.0.1"      interface to which the server will bind
44
45
46       -D, --buildDrafts[=false]      include content marked as draft
47
48
49       -E, --buildExpired[=false]      include expired content
50
51
52       -F,  --buildFuture[=false]      include content with publishdate in the
53       future
54
55
56       --cacheDir=""      filesystem path to cache directory.  Defaults:  $TM‐
57       PDIR/hugo_cache/
58
59
60       --cleanDestinationDir[=false]       remove  files  from destination not
61       found in static directories
62
63
64       --clock=""       set   the   clock   used   by   Hugo,   e.g.   --clock
65       2021-11-06T22:30:00.00+09:00
66
67
68       -c, --contentDir=""      filesystem path to content directory
69
70
71       -d, --destination=""      filesystem path to write files to
72
73
74       --disableBrowserError[=false]       do  not  show  build  errors in the
75       browser
76
77
78       --disableFastRender[=false]      enables full re-renders on changes
79
80
81       --disableKinds=[]      disable different kind of pages (home, RSS etc.)
82
83
84       --disableLiveReload[=false]      watch without  enabling  live  browser
85       reload on rebuild
86
87
88       --enableGitInfo[=false]       add Git revision, date, author, and CODE‐
89       OWNERS info to the pages
90
91
92       -e, --environment=""      build environment
93
94
95       --forceSyncStatic[=false]      copy all files when static is changed.
96
97
98       --gc[=false]      enable to run some cleanup tasks (remove unused cache
99       files) after the build
100
101
102       -h, --help[=false]      help for server
103
104
105       --ignoreCache[=false]      ignores the cache directory
106
107
108       --ignoreVendorPaths=""      ignores any _vendor for module paths match‐
109       ing the given Glob pattern
110
111
112       -l, --layoutDir=""      filesystem path to layout directory
113
114
115       --liveReloadPort=-1      port for live reloading  (i.e.  443  in  HTTPS
116       proxy situations)
117
118
119       --meminterval="100ms"       interval  to  poll  memory  usage (requires
120       --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m",
121       "h".
122
123
124       --memstats=""      log memory usage to this file
125
126
127       --minify[=false]       minify  any  supported  output format (HTML, XML
128       etc.)
129
130
131       --navigateToChanged[=false]      navigate to changed  content  file  on
132       live browser reload
133
134
135       --noBuildLock[=false]      don't create .hugo_build.lock file
136
137
138       --noChmod[=false]      don't sync permission mode of files
139
140
141       --noHTTPCache[=false]      prevent HTTP caching
142
143
144       --noTimes[=false]      don't sync modification time of files
145
146
147       --panicOnWarning[=false]      panic on first WARNING log
148
149
150       --poll=""       set this to a poll interval, e.g --poll 700ms, to use a
151       poll based approach to watch for file system changes
152
153
154       -p, --port=1313      port on which the server will listen
155
156
157       --printI18nWarnings[=false]      print missing translations
158
159
160       --printMemoryUsage[=false]      print memory usage to screen at  inter‐
161       vals
162
163
164       --printPathWarnings[=false]       print  warnings  on  duplicate target
165       paths etc.
166
167
168       --printUnusedTemplates[=false]      print warnings on unused templates.
169
170
171       --renderStaticToDisk[=false]      serve static files from disk and  dy‐
172       namic files from memory
173
174
175       --renderToDisk[=false]       serve all files from disk (default is from
176       memory)
177
178
179       -s, --source=""      filesystem path to read files relative from
180
181
182       --templateMetrics[=false]      display metrics  about  template  execu‐
183       tions
184
185
186       --templateMetricsHints[=false]       calculate  some  improvement hints
187       when combined with --templateMetrics
188
189
190       -t, --theme=[]      themes to use (located in /themes/THEMENAME/)
191
192
193       --themesDir=""      filesystem path to themes directory
194
195
196       --trace=""      write trace to file (not useful in general)
197
198
199       -w, --watch[=true]      watch filesystem for changes  and  recreate  as
200       needed
201
202
203

OPTIONS INHERITED FROM PARENT COMMANDS

205       --config=""      config file (default is hugo.yaml|json|toml)
206
207
208       --configDir="config"      config dir
209
210
211       --debug[=false]      debug output
212
213
214       --log[=false]      enable Logging
215
216
217       --logFile=""      log File path (if set, logging enabled automatically)
218
219
220       --quiet[=false]      build in quiet mode
221
222
223       -v, --verbose[=false]      verbose output
224
225
226       --verboseLog[=false]      verbose logging
227
228
229

SEE ALSO

231       hugo(1)
232
233
234
235Hugo 0.111.3                       Jul 2023                     HUGO-SERVER(1)
Impressum