Skip to content

Commit

Permalink
Hugo server watch by default
Browse files Browse the repository at this point in the history
  • Loading branch information
spf13 committed Nov 20, 2015
1 parent 35abd17 commit 97d0689
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ 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.
Often server is paired with '--watch' which Hugo will look for changes to the source and
continously rebuild and serve the website.`,
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.`,
//Run: server,
}

Expand All @@ -81,7 +83,7 @@ func (f noDirFile) Readdir(count int) ([]os.FileInfo, error) {
func init() {
serverCmd.Flags().IntVarP(&serverPort, "port", "p", 1313, "port on which the server will listen")
serverCmd.Flags().StringVarP(&serverInterface, "bind", "", "127.0.0.1", "interface to which the server will bind")
serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", false, "watch filesystem for changes and recreate as needed")
serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", true, "watch filesystem for changes and recreate as needed")
serverCmd.Flags().BoolVarP(&serverAppend, "appendPort", "", true, "append port to baseurl")
serverCmd.Flags().BoolVar(&disableLiveReload, "disableLiveReload", false, "watch without enabling live browser reload on rebuild")
serverCmd.Flags().BoolVar(&renderToDisk, "renderToDisk", false, "render to Destination path (default is render to memory & serve from there)")
Expand Down
1 change: 1 addition & 0 deletions docs/content/meta/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ weight: 10
## **0.15.0** ???

* `hugo server` now builds ~30%+ faster by rendering to memory instead of disk
* `hugo server` will watch by default now.
* Have Jekyll site, but dreaming of porting it to Hugo? This release introduces a new `hugo import jekyll`command that makes this easier than ever. [1469](https://github.com/spf13/hugo/pull/1469)
* We now use a custom-built `LazyFileReader` for reading file contents, which means we don't read media files in `/content` into memory anymore -- and file reading is now performed in parallel on multicore PCs. [1181](https://github.com/spf13/hugo/issues/1181)
* Hugo is now built with `Go 1.5` which, among many other improvements, have fixed the last known data race in Hugo. [917] (https://github.com/spf13/hugo/issues/917)
Expand Down

0 comments on commit 97d0689

Please sign in to comment.