mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
230a495941
93f7baf80 netlify: Hugo 0.92.2 ecd8a6b6b Merge branch 'tempv0.92.2' ee04caf9f Fix validation of Page Kind in cascade target map 3fce03ed2 Remove the "check" command 70ad71b25 Fix typo (#1651) dfd1dc570 Fix internal link (#1650) b5e0e0d38 Update rotten Fedora package link 78276390a Add missing word in types.md (#1645) 45eb945f8 Remove hugo gen autocomplete 2f84d0896 netlify: Hugo 0.92.1 b55f5773b Update complement.md 7013ee43e Remove deprecated RSSLink from page variables 1c3fb6ed3 Remove deprecated page vars (#1638) 9bd0af3ab Update union.md 4576487a0 Update symdiff.md 58f1b26c7 Update starter-kits.md (#1521) 285356c1d Move inline partials section (#1635) 4d08625d2 Improve directions for editing Win 10 path env var (#1632) 41d9c7804 Update page content (#1629) d05536cad Removed unpaired quote character (#1630) 3b0fdcd88 netlify: Bump to Hugo 0.92.0 cdb068346 docs: Regenerate docshelper 778503ca8 Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb' 2d2401c91 docs: Add dependency table to maintainance page 6bc95c386 Add hugo.Deps 19d0b5e23 docs. Regen CLI docs 76a750d96 docs: Regenerate CLI docs 70156962a docs: Regenerate docshelper git-subtree-dir: docs git-subtree-split: 93f7baf80bd03176ad44701cd2452433d492ea0b
4.9 KiB
4.9 KiB
title | slug | url |
---|---|---|
hugo server | hugo_server | /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
--panicOnWarning panic on first WARNING log
--path-warnings print warnings on duplicate target paths etc.
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
-p, --port int port on which the server will listen (default 1313)
--print-mem print memory usage to screen at intervals
--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
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--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 - hugo builds your site