Improve language handling in URLs
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 7 Aug 2016 20:01:55 +0000 (22:01 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 6 Sep 2016 15:32:18 +0000 (18:32 +0300)
commit54141f71dd0ffbd2af326581b78ecafe7f054f51
treea814b50027d9c9a439aa43eeb734f97e189ed968
parent2079a23dd89734cea39e523faf46e44201151279
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
20 files changed:
docs/content/content/multilingual.md
docs/content/templates/functions.md
helpers/language.go [new file with mode: 0644]
helpers/url.go
helpers/url_test.go
hugolib/handler_test.go
hugolib/hugo_sites.go
hugolib/menu_test.go
hugolib/multilingual.go
hugolib/node.go
hugolib/robotstxt_test.go
hugolib/rss_test.go
hugolib/shortcode_test.go
hugolib/site.go
hugolib/site_show_plan_test.go
hugolib/site_test.go
hugolib/site_url_test.go
hugolib/sitemap_test.go
tpl/template_funcs.go
tpl/template_funcs_test.go