Commit graph

17 commits

Author SHA1 Message Date
Bjørn Erik Pedersen bbfebdea43 Fix Data in multisites
Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen d8a256c155 Fix YAML loading of multilingual config
And some other minor fixes from code review.

Updates #2309
2016-09-06 18:32:20 +03:00
Bjørn Erik Pedersen a07293cf97 Create a Node map to get proper node translations
In a multi-language setup, before this commit the Node's Translations() method
would return some "dummy nodes" that would point to the correct page (Permalink),
but would not be the same as the node it points to -- it would not have the translated
title etc.

The node creation is, however, so mingled with rendering, whihc is too early to have any global state,
so the nodes has to be split in a prepare and a render phase. This commits does that with as small
a change as possible. This implementation is a temp solution until we fix #2297.

Updates #2309
2016-09-06 18:32:19 +03:00
Bjørn Erik Pedersen d953e39e63 Add parent as owner to Site
And pull up common member vars like Tmpl and Multilinguage.

Or: the final multilingual TODO-fixes.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 9798a95670 Make the check command work in multilingual mode
Or: some more multilingual TODO-fixes.

See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 6b552db75f Make sure drafts etc. are not processed
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen e56ecab157 Multilingual TODO-fixes, take 1
See #2309
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 54141f71dd 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
2016-09-06 18:32:18 +03:00
Bjørn Erik Pedersen 2079a23dd8 Make it possible to configure Blackfroday per language
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 596e0e98e4 Make it possible to add a language in server mode
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 8b657a11ee Get the list commands up to multi-site level
This commit also unexports some Site methods, making it clear what the external build API really is.

See #2312
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen 90de511017 Make taxonomies configurable per language
See #2312
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen b6fcb3d0bb Add sitemap index for multilingual sites
See #2309
2016-09-06 18:32:17 +03:00
Bjørn Erik Pedersen ed0985404d Render the shortcodes as late as possible
This is needed to make shortcode users happy with the new multilanguage support,
but it will also solve many other related posts about "stuff not available in the shortcode".

We will have to revisit this re the handler chain at some point, but that will be easier
now as the integration test story has improved so much.

As part of this commit, the site-building tests in page_test.go is refreshed, they now
tests for all the rendering engines (when available), and all of them now uses the
same code-path as used in production.

Fixes #1229
Fixes #2323
Fixes ##1076
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 708bc78770 Optimize the multilanguage build process
Work In Progress!

This commit makes a rework of the build and rebuild process to better suit a multi-site setup.

This also includes a complete overhaul of the site tests. Previous these were a messy mix that
were testing just small parts of the build chain, some of it testing code-paths not even used in
"real life". Now all tests that depends on a built site follows the same and real production code path.

See #2309
Closes #2211
Closes #477
Closes #1744
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen f023dfd763 Move the Build* methods to HugoSites
See #2309
2016-09-06 18:32:16 +03:00
Bjørn Erik Pedersen 5b9c2a40f1 Move HugoSites to hugolib
It will get more involved in the build process in a minute.

See #2309
2016-09-06 18:32:16 +03:00