mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Introduce HugoSites type
And a Hugo global variable which contains the site under build. This is really needed to get some level of control of the "multiple languages" in play. There are still work related to this scattered around, but that will come. With this commit, the multilingual feature is starting to work.
This commit is contained in:
@@ -73,7 +73,7 @@ func TestShouldNotAddTrailingSlashToBaseURL(t *testing.T) {
|
||||
{"http://base.com", "http://base.com"}} {
|
||||
|
||||
viper.Set("BaseURL", this.in)
|
||||
s := &Site{}
|
||||
s := newSiteDefaultLang()
|
||||
s.initializeSiteInfo()
|
||||
|
||||
if s.Info.BaseURL != template.URL(this.expected) {
|
||||
@@ -93,6 +93,7 @@ func TestPageCount(t *testing.T) {
|
||||
viper.Set("paginate", 10)
|
||||
s := &Site{
|
||||
Source: &source.InMemorySource{ByteSource: urlFakeSource},
|
||||
Lang: newDefaultLanguage(),
|
||||
}
|
||||
s.initializeSiteInfo()
|
||||
s.prepTemplates("indexes/blue.html", indexTemplate)
|
||||
|
Reference in New Issue
Block a user