summaryrefslogtreecommitdiffhomepage
path: root/commands/server.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-01-27 10:58:30 +0100
committerBjørn Erik Pedersen <[email protected]>2018-01-27 10:58:30 +0100
commited4a00e46f2344320a22f07febe5aec4075cb3fb (patch)
tree21d1d072e0ea5fe8f63e2a32ddb2657697db3c53 /commands/server.go
parent7b472e46084b603045b87cea870ffc73ac1cf7e7 (diff)
downloadhugo-ed4a00e46f2344320a22f07febe5aec4075cb3fb.tar.gz
hugo-ed4a00e46f2344320a22f07febe5aec4075cb3fb.zip
commands: Fix baseURL server regression for multilingual sites
This was introduced in 6413559f7575e2653d76227a8037a7edbaae82aa a couple of days ago, and demonstrates that we really need better tests for the server/commands package. Fixes #4333
Diffstat (limited to 'commands/server.go')
-rw-r--r--commands/server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/server.go b/commands/server.go
index f2522aaf7..be93489d4 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -186,7 +186,9 @@ func server(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- language.Set("baseURL", baseURL)
+ if isMultiHost {
+ language.Set("baseURL", baseURL)
+ }
if i == 0 {
c.Set("baseURL", baseURL)
}