1HUGO-SERVER(1) Hugo Manual HUGO-SERVER(1)
2
3
4
6 hugo-server - A high performance webserver
7
8
9
11 hugo server [flags]
12
13
14
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
36 --appendPort[=true]
37 append port to baseURL
38
39
40 -b, --baseURL=""
41 hostname (and path) to the root, e.g. ⟨http://spf13.com/⟩
42
43
44 --bind="127.0.0.1"
45 interface to which the server will bind
46
47
48 -D, --buildDrafts[=false]
49 include content marked as draft
50
51
52 -E, --buildExpired[=false]
53 include expired content
54
55
56 -F, --buildFuture[=false]
57 include content with publishdate in the future
58
59
60 --cacheDir=""
61 filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
62
63
64 --cleanDestinationDir[=false]
65 remove files from destination not found in static directories
66
67
68 -c, --contentDir=""
69 filesystem path to content directory
70
71
72 -d, --destination=""
73 filesystem path to write files to
74
75
76 --disableBrowserError[=false]
77 do not show build errors in the browser
78
79
80 --disableFastRender[=false]
81 enables full re-renders on changes
82
83
84 --disableKinds=[]
85 disable different kind of pages (home, RSS etc.)
86
87
88 --disableLiveReload[=false]
89 watch without enabling live browser reload on rebuild
90
91
92 --enableGitInfo[=false]
93 add Git revision, date and author info to the pages
94
95
96 -e, --environment=""
97 build environment
98
99
100 --forceSyncStatic[=false]
101 copy all files when static is changed.
102
103
104 --gc[=false]
105 enable to run some cleanup tasks (remove unused cache files) after
106 the build
107
108
109 -h, --help[=false]
110 help for server
111
112
113 --i18n-warnings[=false]
114 print missing translations
115
116
117 --ignoreCache[=false]
118 ignores the cache directory
119
120
121 -l, --layoutDir=""
122 filesystem path to layout directory
123
124
125 --liveReloadPort=-1
126 port for live reloading (i.e. 443 in HTTPS proxy situations)
127
128
129 --meminterval="100ms"
130 interval to poll memory usage (requires --memstats), valid time
131 units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
132
133
134 --memstats=""
135 log memory usage to this file
136
137
138 --minify[=false]
139 minify any supported output format (HTML, XML etc.)
140
141
142 --navigateToChanged[=false]
143 navigate to changed content file on live browser reload
144
145
146 --noChmod[=false]
147 don't sync permission mode of files
148
149
150 --noHTTPCache[=false]
151 prevent HTTP caching
152
153
154 --noTimes[=false]
155 don't sync modification time of files
156
157
158 --path-warnings[=false]
159 print warnings on duplicate target paths etc.
160
161
162 -p, --port=1313
163 port on which the server will listen
164
165
166 --renderToDisk[=false]
167 render to Destination path (default is render to memory serve from
168 there)
169
170
171 -s, --source=""
172 filesystem path to read files relative from
173
174
175 --templateMetrics[=false]
176 display metrics about template executions
177
178
179 --templateMetricsHints[=false]
180 calculate some improvement hints when combined with
181 --templateMetrics
182
183
184 -t, --theme=[]
185 themes to use (located in /themes/THEMENAME/)
186
187
188 --themesDir=""
189 filesystem path to themes directory
190
191
192 --trace=""
193 write trace to file (not useful in general)
194
195
196 -w, --watch[=true]
197 watch filesystem for changes and recreate as needed
198
199
200
202 --config=""
203 config file (default is path/config.yaml|json|toml)
204
205
206 --configDir="config"
207 config dir
208
209
210 --debug[=false]
211 debug output
212
213
214 --log[=false]
215 enable Logging
216
217
218 --logFile=""
219 log File path (if set, logging enabled automatically)
220
221
222 --quiet[=false]
223 build in quiet mode
224
225
226 -v, --verbose[=false]
227 verbose output
228
229
230 --verboseLog[=false]
231 verbose logging
232
233
234
236 hugo(1)
237
238
239
240Hugo 0.55.6 May 2019 HUGO-SERVER(1)