HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

hugo server — Build and serve a site with Hugo's built-in webserver. More information: <https://gohugo.io/commands

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandbuildandservecliwithhugo serversite

Problem

How to use the hugo server command: Build and serve a site with Hugo's built-in webserver. More information: <https://gohugo.io/commands/hugo_server/>.

Solution

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:
hugo server {{[-p|--port]}} {{port_number}}


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:
hugo server {{[-e|--environment]}} {{production}} --disableFastRender --minify


Display help:
hugo server {{[-h|--help]}}

Code Snippets

Build and serve a site

hugo server

Build and serve a site on a specified port number

hugo server {{[-p|--port]}} {{port_number}}

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

hugo server {{[-e|--environment]}} {{production}} --disableFastRender --minify

Display help

hugo server {{[-h|--help]}}

Context

tldr-pages: common/hugo server

Revisions (0)

No revisions yet.