// Flags that we for some reason don't want to expose in the site config.
internalKeySet := map[string]bool{
- "quiet": true,
- "verbose": true,
- "watch": true,
- "disableLiveReload": true,
- "liveReloadPort": true,
- "renderToMemory": true,
- "clock": true,
+ "quiet": true,
+ "verbose": true,
+ "watch": true,
+ "liveReloadPort": true,
+ "renderToMemory": true,
+ "clock": true,
}
cmd := cd.CobraCommand
// Server mode?
Running bool
- Quiet bool
- Verbose bool
- Clock string
- Watch bool
- DisableLiveReload bool
- LiveReloadPort int
+ Quiet bool
+ Verbose bool
+ Clock string
+ Watch bool
+ LiveReloadPort int
}
// All non-params config keys for language.
// Disable the injection of the Hugo generator tag on the home page.
DisableHugoGeneratorInject bool
+ // Disable live reloading in server mode.
+ DisableLiveReload bool
+
// Enable replacement in Pages' Content of Emoji shortcodes with their equivalent Unicode characters.
// <docsmeta>{"identifiers": ["Content", "Unicode"] }</docsmeta>
EnableEmoji bool
pd.AbsURLPath = s.absURLPath(targetPath)
}
- if s.watching() && s.conf.Internal.Running && !s.conf.Internal.DisableLiveReload {
+ if s.watching() && s.conf.Internal.Running && !s.conf.DisableLiveReload {
pd.LiveReloadBaseURL = s.Conf.BaseURLLiveReload().URL()
}
--- /dev/null
+hugo server --renderToDisk --disableLiveReload &
+
+waitServer
+
+! grep 'livereload' public/index.html
+
+stopServer
+! stderr .
+
+-- hugo.toml --
+baseURL = "http://example.org/"
+disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
+-- layouts/index.html --
+<html>
+<head>
+</head>
+<body>
+Home.
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+hugo server --renderToDisk &
+
+waitServer
+
+! grep 'livereload' public/index.html
+
+stopServer
+! stderr .
+
+-- hugo.toml --
+baseURL = "http://example.org/"
+disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
+disableLiveReload = true
+-- layouts/index.html --
+<html>
+<head>
+</head>
+<body>
+Home.
+</body>
+</html>
\ No newline at end of file