mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
831d23cb4d
commit
8378358857
4 changed files with 22 additions and 8 deletions
|
@ -242,6 +242,7 @@ func TestTemplateFuncs(t *testing.T) {
|
|||
b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
|
||||
|
||||
homeTpl := `Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
|
||||
Sites: {{ site.Sites.First.Home.Language.Lang }}
|
||||
Hugo: {{ hugo.Generator }}
|
||||
`
|
||||
|
||||
|
@ -252,8 +253,14 @@ Hugo: {{ hugo.Generator }}
|
|||
|
||||
b.CreateSites().Build(BuildCfg{})
|
||||
|
||||
b.AssertFileContent("public/en/index.html", "Site: en / en / http://example.com/blog",
|
||||
b.AssertFileContent("public/en/index.html",
|
||||
"Site: en / en / http://example.com/blog",
|
||||
"Sites: en",
|
||||
"Hugo: <meta name=\"generator\" content=\"Hugo")
|
||||
b.AssertFileContent("public/fr/index.html", "Site: fr / fr / http://example.com/blog")
|
||||
b.AssertFileContent("public/fr/index.html",
|
||||
"Site: fr / fr / http://example.com/blog",
|
||||
"Sites: en",
|
||||
"Hugo: <meta name=\"generator\" content=\"Hugo",
|
||||
)
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue