mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
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
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user