mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
14e369b961
988f7d5c2 Document default `enableInlineShortcodes` value 0f604a345 Fix typo in 0.66.0 release note 26fc74fe3 How to access individual EXIF data tags d5d3bad9a Fix localhost links fa6921213 Update index.md 5bf558f78 Release 0.66.0 74ccdaaf5 Merge branch 'temp660' 75faa478b releaser: Add release notes to /docs for release of 0.66.0 c4a4a9922 docs: Regen CLI docs 0624ac198 Add build.UseResourceCacheWhen 58a8d7cd1 Add build options documentation d926c595e fix typo 99713d44b resources: Add basic @import support to resources.PostCSS 224b96cf7 deploy: Implement include/exclude filters for deploy eb1a00050 Adjusting description; WordPress with capitalized P 91d8efa22 Add another tool for migration from the Wordpress a6938a4ac Adjust showcase description a9c0a0a69 Adjust showcase e5af08aa6 Adding Aether as a proposed showcase item. 0013daa34 Add hugo.IsProduction function 34c419ef3 tpl: Add math.Sqrt 5bdab0ebd Update minification.md 9039332e2 Hugo 0.65.3 1400caf3a Merge branch 'temp653' 9796bb337 releaser: Add release notes to /docs for release of 0.65.3 65b26598f Fix typo 23aa57d80 Fix crashes for 404 in IsAncestor etc. 42c54bc6c 0.65.2 67fd5c1f6 Merge branch 'temp652' d820ac017 releaser: Add release notes to /docs for release of 0.65.2 51f0888ff Release 0.65.1 91e95260c releaser: Add release notes to /docs for release of 0.65.1 1880ebf05 fix broken link on internal.md ffaa33889 Update migrations.md de4d64675 Another tool for migration from Medium platform 90b178d77 releaser: Add release notes to /docs for release of 0.65.1 6925cda30 Handle corner case with rendering text as code in URL 3cb4b19dd Release 0.65.0 7a600cb99 Merge branch 'temp650' ef9531ff6 releaser: Add release notes to /docs for release of 0.65.0 9bc19606f docs: Regenerate CLI docs d4a886ed2 Add Page.GetTerms a3bf273a5 fix broken link on use-modules.md 001f52f4e Fix mage URL in development.md eef72e887 Merge commit '4b670bc8cc38103c2c60e5090c2f56bf30832b8d' b18a76631 commands: Support "hugo mod get -u ./..." git-subtree-dir: docs git-subtree-split: 988f7d5c2d7a1d40ec2c8ab961cb5a4e41b5bd4c
93 lines
4.6 KiB
Markdown
93 lines
4.6 KiB
Markdown
---
|
|
date: 2020-03-03
|
|
title: "hugo server"
|
|
slug: hugo_server
|
|
url: /commands/hugo_server/
|
|
---
|
|
## hugo server
|
|
|
|
A high performance webserver
|
|
|
|
### Synopsis
|
|
|
|
Hugo provides its own webserver which builds and serves the site.
|
|
While hugo server is high performance, it is a webserver with limited options.
|
|
Many run it in production, but the standard behavior is for people to use it
|
|
in development and use a more full featured server such as Nginx or Caddy.
|
|
|
|
'hugo server' will avoid writing the rendered and served content to disk,
|
|
preferring to store it in memory.
|
|
|
|
By default hugo will also watch your files for any changes you make and
|
|
automatically rebuild the site. It will then live reload any open browser pages
|
|
and push the latest content to them. As most Hugo sites are built in a fraction
|
|
of a second, you will be able to save and see your changes nearly instantly.
|
|
|
|
```
|
|
hugo server [flags]
|
|
```
|
|
|
|
### Options
|
|
|
|
```
|
|
--appendPort append port to baseURL (default true)
|
|
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
|
|
--bind string interface to which the server will bind (default "127.0.0.1")
|
|
-D, --buildDrafts include content marked as draft
|
|
-E, --buildExpired include expired content
|
|
-F, --buildFuture include content with publishdate in the future
|
|
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
|
--cleanDestinationDir remove files from destination not found in static directories
|
|
-c, --contentDir string filesystem path to content directory
|
|
-d, --destination string filesystem path to write files to
|
|
--disableBrowserError do not show build errors in the browser
|
|
--disableFastRender enables full re-renders on changes
|
|
--disableKinds strings disable different kind of pages (home, RSS etc.)
|
|
--disableLiveReload watch without enabling live browser reload on rebuild
|
|
--enableGitInfo add Git revision, date and author info to the pages
|
|
--forceSyncStatic copy all files when static is changed.
|
|
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
|
-h, --help help for server
|
|
--i18n-warnings print missing translations
|
|
--ignoreCache ignores the cache directory
|
|
-l, --layoutDir string filesystem path to layout directory
|
|
--liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
|
|
--meminterval string interval to poll memory usage (requires --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default "100ms")
|
|
--memstats string log memory usage to this file
|
|
--minify minify any supported output format (HTML, XML etc.)
|
|
--navigateToChanged navigate to changed content file on live browser reload
|
|
--noChmod don't sync permission mode of files
|
|
--noHTTPCache prevent HTTP caching
|
|
--noTimes don't sync modification time of files
|
|
--path-warnings print warnings on duplicate target paths etc.
|
|
-p, --port int port on which the server will listen (default 1313)
|
|
--renderToDisk render to Destination path (default is render to memory & serve from there)
|
|
--templateMetrics display metrics about template executions
|
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
|
--trace file write trace to file (not useful in general)
|
|
-w, --watch watch filesystem for changes and recreate as needed (default true)
|
|
```
|
|
|
|
### Options inherited from parent commands
|
|
|
|
```
|
|
--config string config file (default is path/config.yaml|json|toml)
|
|
--configDir string config dir (default "config")
|
|
--debug debug output
|
|
-e, --environment string build environment
|
|
--ignoreVendor ignores any _vendor directory
|
|
--log enable Logging
|
|
--logFile string log File path (if set, logging enabled automatically)
|
|
--quiet build in quiet mode
|
|
-s, --source string filesystem path to read files relative from
|
|
--themesDir string filesystem path to themes directory
|
|
-v, --verbose verbose output
|
|
--verboseLog verbose logging
|
|
```
|
|
|
|
### SEE ALSO
|
|
|
|
* [hugo](/commands/hugo/) - hugo builds your site
|
|
|
|
###### Auto generated by spf13/cobra on 3-Mar-2020
|