1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Fix URLs for bundle resources in multihost mode

Fixes #4217
This commit is contained in:
Bjørn Erik Pedersen
2018-01-05 12:01:13 +01:00
parent f25d8a9e17
commit ab82a27d05
6 changed files with 42 additions and 17 deletions

View File

@@ -273,7 +273,11 @@ func (l *genericResource) Publish() error {
}
func (l *genericResource) target() string {
return l.relPermalinkForRel(l.rel, false)
target := l.relPermalinkForRel(l.rel, false)
if l.spec.PathSpec.Languages.IsMultihost() {
target = path.Join(l.spec.PathSpec.Language.Lang, target)
}
return target
}
func (r *Spec) newGenericResource(