aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-03-12 08:18:23 -0700
committerBjørn Erik Pedersen <[email protected]>2024-03-13 17:34:42 +0200
commitdc6a292133bf3249f1741a7624075b0782b16f84 (patch)
treeee11263c7a02b7f68e33185851511c08bb14c843 /commands
parent4f92f949eaf8c9827a758b3caadc672e0335480b (diff)
downloadhugo-dc6a292133bf3249f1741a7624075b0782b16f84.tar.gz
hugo-dc6a292133bf3249f1741a7624075b0782b16f84.zip
common/hugo: Rename IsMultiHost and IsMultiLingual
hugo.IsMultiHost => hugo.IsMultihost hugo.IsMultiLingual => hugo.IsMultilingual Closes #12232
Diffstat (limited to 'commands')
-rw-r--r--commands/server.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/commands/server.go b/commands/server.go
index 0ce655c51..afc539c44 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -617,9 +617,9 @@ func (c *serverCommand) setBaseURLsInConfig() error {
}
return c.withConfE(func(conf *commonConfig) error {
for i, language := range conf.configs.Languages {
- isMultiHost := conf.configs.IsMultihost
+ isMultihost := conf.configs.IsMultihost
var serverPort int
- if isMultiHost {
+ if isMultihost {
serverPort = c.serverPorts[i].p
} else {
serverPort = c.serverPorts[0].p
@@ -737,9 +737,9 @@ func (c *serverCommand) createServerPorts(cd *simplecobra.Commandeer) error {
flags := cd.CobraCommand.Flags()
var cerr error
c.withConf(func(conf *commonConfig) {
- isMultiHost := conf.configs.IsMultihost
+ isMultihost := conf.configs.IsMultihost
c.serverPorts = make([]serverPortListener, 1)
- if isMultiHost {
+ if isMultihost {
if !c.serverAppend {
cerr = errors.New("--appendPort=false not supported when in multihost mode")
return
@@ -852,7 +852,7 @@ func (c *serverCommand) serve() error {
h *hugolib.HugoSites
)
err := c.withConfE(func(conf *commonConfig) error {
- isMultiHost := conf.configs.IsMultihost
+ isMultihost := conf.configs.IsMultihost
var err error
h, err = c.r.HugFromConfig(conf)
if err != nil {
@@ -862,7 +862,7 @@ func (c *serverCommand) serve() error {
// We need the server to share the same logger as the Hugo build (for error counts etc.)
c.r.logger = h.Log
- if isMultiHost {
+ if isMultihost {
for _, l := range conf.configs.ConfigLangs() {
baseURLs = append(baseURLs, l.BaseURL())
roots = append(roots, l.Language().Lang)
@@ -1005,7 +1005,6 @@ func (c *serverCommand) serve() error {
}
}
}()
-
if err != nil {
c.r.Println("Error:", err)
}