summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites_multihost_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-13 11:01:57 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-13 19:00:51 +0200
commit78f8475a054a6277d37f13329afd240b00dc9408 (patch)
tree92c30c046d64f4b4baa4a99a2183deb9c4dee1fe /hugolib/hugo_sites_multihost_test.go
parentc09ee78fd235599d3fb794110cd75c024d80cfca (diff)
Fix Resource output in multihost setups
In Hugo 0.46 we made the output of what you get from resources.Get and similar static, i.e. language agnostic. This makes total sense, as it is wasteful and time-consuming to do SASS/SCSS/PostCSS processing for lots of languages when the output is lots of duplicates with different filenames. But since we now output the result once only, this had a negative side effect for multihost setups: We publish the resource once only to the root folder (i.e. not to the language "domain folder"). This commit removes the language code from the processed image keys. This creates less duplication in the file cache, but it means that you should do a `hugo --gc` to clean up stale files. Fixes #5058
Diffstat (limited to 'hugolib/hugo_sites_multihost_test.go')
-rw-r--r--hugolib/hugo_sites_multihost_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/hugo_sites_multihost_test.go b/hugolib/hugo_sites_multihost_test.go
index 4062868e6..83d6bfc9e 100644
--- a/hugolib/hugo_sites_multihost_test.go
+++ b/hugolib/hugo_sites_multihost_test.go
@@ -81,8 +81,10 @@ languageName = "Nynorsk"
s2h := s2.getPage(KindHome)
assert.Equal("https://example.fr/", s2h.Permalink())
- b.AssertFileContent("public/fr/index.html", "French Home Page")
- b.AssertFileContent("public/en/index.html", "Default Home Page")
+ b.AssertFileContent("public/fr/index.html", "French Home Page", "String Resource: /docs/text/pipes.txt")
+ b.AssertFileContent("public/fr/text/pipes.txt", "Hugo Pipes")
+ b.AssertFileContent("public/en/index.html", "Default Home Page", "String Resource: /docs/text/pipes.txt")
+ b.AssertFileContent("public/en/text/pipes.txt", "Hugo Pipes")
// Check paginators
b.AssertFileContent("public/en/page/1/index.html", `refresh" content="0; url=https://example.com/docs/"`)