From 54141f71dd0ffbd2af326581b78ecafe7f054f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 7 Aug 2016 22:01:55 +0200 Subject: 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 --- hugolib/sitemap_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hugolib/sitemap_test.go') 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 { -- cgit v1.2.3