aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-05-30 11:35:02 +0200
committerBjørn Erik Pedersen <[email protected]>2024-05-30 11:35:02 +0200
commiteaa42a87546e470402c42d52116c1722fae61ddb (patch)
treebfa2205e2669780b2fa060a349c32cfcad1c2678 /commands
parent245928a1ff49c6a1c25524f08bf538b0ab88f1a8 (diff)
downloadhugo-eaa42a87546e470402c42d52116c1722fae61ddb.tar.gz
hugo-eaa42a87546e470402c42d52116c1722fae61ddb.zip
commands: Add shorthand flags -M (--renderToMemory) and -N (--navigateToChanged)
Closes #12530
Diffstat (limited to 'commands')
-rw-r--r--commands/commandeer.go2
-rw-r--r--commands/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go
index 5d4f02a4d..59fe32f74 100644
--- a/commands/commandeer.go
+++ b/commands/commandeer.go
@@ -506,7 +506,7 @@ Complete documentation is available at https://gohugo.io/.`
cmd.PersistentFlags().StringVar(&r.cfgDir, "configDir", "config", "config dir")
_ = cmd.MarkFlagDirname("configDir")
cmd.PersistentFlags().BoolVar(&r.quiet, "quiet", false, "build in quiet mode")
- cmd.PersistentFlags().BoolVar(&r.renderToMemory, "renderToMemory", false, "render to memory (mostly useful when running the server)")
+ cmd.PersistentFlags().BoolVarP(&r.renderToMemory, "renderToMemory", "M", false, "render to memory (mostly useful when running the server)")
cmd.PersistentFlags().BoolVarP(&r.verbose, "verbose", "v", false, "verbose output")
cmd.PersistentFlags().BoolVarP(&r.debug, "debug", "", false, "debug output")
diff --git a/commands/server.go b/commands/server.go
index 5832c83d8..6d64a38c6 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -538,7 +538,7 @@ of a second, you will be able to save and see your changes nearly instantly.`
cmd.Flags().BoolVar(&c.noHTTPCache, "noHTTPCache", false, "prevent HTTP caching")
cmd.Flags().BoolVarP(&c.serverAppend, "appendPort", "", true, "append port to baseURL")
cmd.Flags().BoolVar(&c.disableLiveReload, "disableLiveReload", false, "watch without enabling live browser reload on rebuild")
- cmd.Flags().BoolVar(&c.navigateToChanged, "navigateToChanged", false, "navigate to changed content file on live browser reload")
+ cmd.Flags().BoolVarP(&c.navigateToChanged, "navigateToChanged", "N", false, "navigate to changed content file on live browser reload")
cmd.Flags().BoolVar(&c.renderStaticToDisk, "renderStaticToDisk", false, "serve static files from disk and dynamic files from memory")
cmd.Flags().BoolVar(&c.disableFastRender, "disableFastRender", false, "enables full re-renders on changes")
cmd.Flags().BoolVar(&c.disableBrowserError, "disableBrowserError", false, "do not show build errors in the browser")