diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-08-07 22:01:55 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-06 18:32:18 +0300 |
commit | 54141f71dd0ffbd2af326581b78ecafe7f054f51 (patch) | |
tree | a814b50027d9c9a439aa43eeb734f97e189ed968 /hugolib/sitemap_test.go | |
parent | 2079a23dd89734cea39e523faf46e44201151279 (diff) |
Improve language handling in URLs
The current "rendering language" is needed outside of Site. This commit moves the Language type to the helpers package, and then used to get correct correct language configuration in the markdownify template func.
This commit also adds two new template funcs: relLangURL and absLangURL.
See #2309
Diffstat (limited to 'hugolib/sitemap_test.go')
-rw-r--r-- | hugolib/sitemap_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go index 58408ce47..6c57084db 100644 --- a/hugolib/sitemap_test.go +++ b/hugolib/sitemap_test.go @@ -43,7 +43,7 @@ func TestSitemapOutput(t *testing.T) { s := &Site{ Source: &source.InMemorySource{ByteSource: weightedSources}, - Language: newDefaultLanguage(), + Language: helpers.NewDefaultLanguage(), } if err := buildAndRenderSite(s, "sitemap.xml", SITEMAP_TEMPLATE); err != nil { |