Files
tldr/pages.zh/common/hugo-server.md

24 lines
612 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# hugo 服务器
> 使用 Hugo 内置的网页服务器构建和提供网站。
> 更多信息:<https://gohugo.io/commands/hugo_server/>.
- 构建并提供一个网站:
`hugo server`
- 在指定的端口号上构建并提供一个网站:
`hugo server --port {{port_number}}`
- 在构建和提供网站时压缩支持的输出格式HTML、XML等
`hugo server --minify`
- 在生产环境中构建并提供一个网站,进行完全重渲染,并压缩支持的格式:
`hugo server --environment {{production}} --disableFastRender --minify`
- 显示帮助信息:
`hugo server --help`