summaryrefslogtreecommitdiffstats
path: root/hugolib/handler_test.go
AgeCommit message (Collapse)Author
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-03-27Remove the now superflous defaultExtensionBjørn Erik Pedersen
And some other unsed fields and methods.
2017-02-17all: Refactor to nonglobal Viper, i18n etc.Bjørn Erik Pedersen
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
2016-10-24all: Unify case of config variable namesAlbert Nigmatzianov
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
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-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-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-08-19hugolib: Use named keys in composite literalsCameron Moore
Make `go vet` great again
2016-04-12Fix broken testsBjørn Erik Pedersen
2016-04-12Revert "Use Node.ID for anchor ID"Bjørn Erik Pedersen
This reverts commit cd558958a0c0ecd06f7560a38e27334fe983e0de.
2016-04-11Use Node.ID for anchor IDBjørn Erik Pedersen
Fixes #2057
2016-03-31Add readFile template funcBjørn Erik Pedersen
This also includes a refactor of the hugofs package and its usage. The motivation for that is: The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...) Fixes #1551
2016-03-09Create template clone for late template executionBjørn Erik Pedersen
Fixing some breaking blogs on Go 1.6 Fixes #1879
2016-03-05Unexport the target handlersBjørn Erik Pedersen
These are of no interest outside the package.
2015-12-10Add copyright header to that source files that don’t have one.Anthony Fok
See #1646
2015-05-20Adding default handler & tests Fixes #147spf13