2025-03-14 21:59:59 -06:00
|
|
|
# hugo server
|
|
|
|
|
|
|
|
|
|
> Build and serve a site with Hugo's built-in webserver.
|
|
|
|
|
> More information: <https://gohugo.io/commands/hugo_server/>.
|
|
|
|
|
|
|
|
|
|
- Build and serve a site:
|
|
|
|
|
|
|
|
|
|
`hugo server`
|
|
|
|
|
|
|
|
|
|
- Build and serve a site on a specified port number:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`hugo server {{[-p|--port]}} {{port_number}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Build and serve a site while minifying supported output formats (HTML, XML, etc.):
|
|
|
|
|
|
|
|
|
|
`hugo server --minify`
|
|
|
|
|
|
|
|
|
|
- Build and serve a site in the production environment with full re-renders while minifying supported formats:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`hugo server {{[-e|--environment]}} {{production}} --disableFastRender --minify`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`hugo server {{[-h|--help]}}`
|