summaryrefslogtreecommitdiffstats
path: root/hugolib
AgeCommit message (Collapse)Author
2016-09-12Add Language.LanguageNameBjørn Erik Pedersen
Fixes #2435
2016-09-12Support site menu per languageBjørn Erik Pedersen
Fixes #2434
2016-09-12hugolib: Fix typos in testsCameron Moore
2016-09-11Fix reload dir matching in themeBjørn Erik Pedersen
Fixes #2430
2016-09-11Handle symlink change eventBjørn Erik Pedersen
Hugo 0.16 announced support for symbolic links for the root folders, /content, /static etc., but this got broken pretty fast. The main problem this commit tries to solve is the matching of file change events to "what changed". An example: ContentDir: /mysites/site/content where /mysites/site/content is a symlink to /mycontent /mycontent: /mypost1.md /post/mypost2.md * A change to mypost1.md (on OS X) will trigger a file change event with name "/mycontent/mypost1.md" * A change to mypost2.md gives event with name "/mysites/site/content/mypost2.md" The first change will not trigger a correct update of Hugo before this commit. This commit fixes this by doing a two-step check: 1. Check if "/mysites/site/content/mypost2.md" is within /mysites/site/content 2. Check if "/mysites/site/content/mypost2.md" is within the real path that /mysites/site/content points to Fixes #2265 Closes #2273
2016-09-11Prevent panic on empty authorlistMathias Biilmann
2016-09-09Redirect to root when DefaultContentLanguageInSubdir = falseBjørn Erik Pedersen
Fixes #2422
2016-09-09Fix paginator counter on x86-32Bjørn Erik Pedersen
Atomic operations with 64 bit values must be aligned for 64-bit on x86-32. According to the spec: "The first word in a global variable or in an allocated struct or slice can be relied upon to be 64-bit aligned." The above wasn't enough for the `paginationPageCount` on `SiteInfo`, maybe due to how `SiteInfo` is embedded. This commit adds a 4 byte padding before the `uint64` that creates the correct alignment. Fixes #2415
2016-09-08Fix shortcode vs pygmentsBjørn Erik Pedersen
This is the nth attempt to fix an issue by changing the placeholder token pattern, but now we actually have tests for all the historic trouble cases. Fixes #2223
2016-09-08Fix pagination page counter on 32 bitBjørn Erik Pedersen
Updates #2415
2016-09-08Reset the i18n func map on reloadBjørn Erik Pedersen
Also improve the error message on missing resource bundles.
2016-09-08Add missing read lock in getNodesBjørn Erik Pedersen
2016-09-06Fix go vet 1.7 issuesBjørn Erik Pedersen
Updates #2309
2016-09-06Make sure the 404 node has .Data.PagesBjørn Erik Pedersen
Updates #2309
2016-09-06Fix site reset for benchmarks etc.Bjørn Erik Pedersen
Updates #2309
2016-09-06Fix multilingual reload when shortcode changesBjørn Erik Pedersen
This commit also refines the partial rebuild logic, to make sure we do not do more work than needed. Updates #2309
2016-09-06Set lang template globals for each site when render shortcodesBjørn Erik Pedersen
We should get rid of these globals, but that is another month.
2016-09-06Small adjustment to SiteInfo initBjørn Erik Pedersen
After a visual inspection to make (pretty) sure it is correct re multiple languages. Updates #2309
2016-09-06Create a copy of the section node for RSSBjørn Erik Pedersen
So the Permalink gets correct when listing translations. I have also checked the other relevant places to make sure we do not overwrite node values we need later. Pointers can be tricky, but lesson learned is: A copy is cheap. Updates #2309
2016-09-06Fix Data in multisitesBjørn Erik Pedersen
Updates #2309
2016-09-06Add JSON config to the multilanguage testingBjørn Erik Pedersen
Updates #2309
2016-09-06Fix YAML loading of multilingual configBjørn Erik Pedersen
And some other minor fixes from code review. Updates #2309
2016-09-06Add data testsBjørn Erik Pedersen
Updates #2309
2016-09-06Create a Node map to get proper node translationsBjørn Erik Pedersen
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-06Add IsTranslated to Node and PageBjørn Erik Pedersen
Makes the templates simpler. See #2309
2016-09-06Remove unused Multilingual Viper defaultBjørn Erik Pedersen
See #2312
2016-09-06Render main content language in root by defaultBjørn Erik Pedersen
Fixes #2312
2016-09-06Add parent as owner to SiteBjørn Erik Pedersen
And pull up common member vars like Tmpl and Multilinguage. Or: the final multilingual TODO-fixes. See #2309
2016-09-06Make the check command work in multilingual modeBjørn Erik Pedersen
Or: some more multilingual TODO-fixes. See #2309
2016-09-06Make sure drafts etc. are not processedBjørn Erik Pedersen
See #2309
2016-09-06Multilingual TODO-fixes, take 1Bjørn Erik Pedersen
See #2309
2016-09-06Fix some corner cases in revised summary handlingBjørn Erik Pedersen
And clean up the test. See #2309
2016-09-06Fix the shortcode ref testsBjørn Erik Pedersen
See #2309
2016-09-06Improve language handling in URLsBjørn Erik Pedersen
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-06Make it possible to configure Blackfroday per languageBjørn Erik Pedersen
See #2309
2016-09-06Make it possible to add a language in server modeBjørn Erik Pedersen
See #2309
2016-09-06Get the list commands up to multi-site levelBjørn Erik Pedersen
This commit also unexports some Site methods, making it clear what the external build API really is. See #2312
2016-09-06Make taxonomies configurable per languageBjørn Erik Pedersen
See #2312
2016-09-06Make the config loading testableBjørn Erik Pedersen
This is needed to verify #2309, but it closes a big hole in Hugo's automated tests. The loading of the config is now moved to `hugolib` and the same default settings are now used in production and tests. As Viper now uses Afero as its filesystem, we now can write fairly complete integration tests with ease. See #2309
2016-09-06Add sitemap index for multilingual sitesBjørn Erik Pedersen
See #2309
2016-09-06Redirect to main language from rootBjørn Erik Pedersen
See #2312 See #2309
2016-09-06Rework the multilingual docsBjørn Erik Pedersen
And in the same go adjusted some minor parts of the language API: Add LanguagePrefix alias to Node and rename the Multilingual config section to Languages. See #2309
2016-09-06Render the shortcodes as late as possibleBjørn Erik Pedersen
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-06Optimize the multilanguage build processBjørn Erik Pedersen
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-06Move the Build* methods to HugoSitesBjørn Erik Pedersen
See #2309
2016-09-06Move HugoSites to hugolibBjørn Erik Pedersen
It will get more involved in the build process in a minute. See #2309
2016-09-06Add Translations and AllTranslations to NodeBjørn Erik Pedersen
This commit also consolidates URLs on Node vs Page, so now .Permalink should be interoperable. Note that this implementations should be fairly short-livded, waiting for #2297, but the API should be stable.
2016-09-06Rework the i18n template func handlingBjørn Erik Pedersen
Setting the language to use when loading the language bundles just doesn't work. The template system is unfortanetely a global, and the last languate processed won ...
2016-09-06Introduce HugoSites typeBjørn Erik Pedersen
And a Hugo global variable which contains the site under build. This is really needed to get some level of control of the "multiple languages" in play. There are still work related to this scattered around, but that will come. With this commit, the multilingual feature is starting to work.
2016-09-06Reset translation slice on rebuildBjørn Erik Pedersen
Also add all translations, including the current, to the slice. We filter later.