diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-01-27 10:58:30 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-01-27 10:58:30 +0100 |
commit | ed4a00e46f2344320a22f07febe5aec4075cb3fb (patch) | |
tree | 21d1d072e0ea5fe8f63e2a32ddb2657697db3c53 /commands/server.go | |
parent | 7b472e46084b603045b87cea870ffc73ac1cf7e7 (diff) | |
download | hugo-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.go | 4 |
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) } |