Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-03tpl/partials: Allow any key type in partialCachedBjørn Erik Pedersen
Fixes #6572
2019-08-12tests: Convert from testify to quicktestBjørn Erik Pedersen
2019-07-24Add Hugo ModulesBjørn Erik Pedersen
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
2019-04-02tpl: Allow the partial template func to return any typeBjørn Erik Pedersen
This commit adds support for return values in partials. This means that you can now do this and similar: {{ $v := add . 42 }} {{ return $v }} Partials without a `return` statement will be rendered as before. This works for both `partial` and `partialCached`. Fixes #5783
2018-12-06hugolib: Add .Site.SitesBjørn Erik Pedersen
Fixes #5504
2018-12-06Add tpl/site and tpl/hugoBjørn Erik Pedersen
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc. Fixes #5470 Fixes #5467 Fixes #5503
2018-10-30tpl: Fix BOM issue in templatesBjørn Erik Pedersen
Fixes #4895
2018-02-05hugolib: Add additional test to TestTemplateLookupOrderCameron Moore
Add an additional test to "Variant 4, theme, use site base" to also test for the index.html base (from by testing of #3505). Also add a "name" field to the test cases to make it easier to know which test is failing versus just getting a slice index.
2018-02-05hugolib: Fix broken TestTemplateLookupOrderCameron Moore
It looks like we left some debugging code in place that caused all but one test case to run.
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-03-02hugolib: Add section template baseof test caseBjørn Erik Pedersen
Closes #2995 See #3116
2017-03-02hugolib: Add /layouts/SECTION/list.html to template lookupBjørn Erik Pedersen
Fixes #3116
2017-02-18hugolib: More test helper cleanupBjørn Erik Pedersen
2017-02-17hugolib: Test helper cleanupBjørn Erik Pedersen
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-06Revert "hugolib: Add some baseof test variants"Bjørn Erik Pedersen
This reverts commit d11f37d97cb3b1298f04f2fbc6ba643d93509b35. Will have to look more closely into this. See #2995
2017-02-06hugolib: Add some baseof test variantsBjørn Erik Pedersen
See #2995
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
2017-01-07all: Refactor to non-global loggerBjørn Erik Pedersen
Note that this looks like overkill for just the logger, and that is correct, but this will make sense once we start with the template handling etc. Updates #2701
2016-12-15hugolib: Enable override of theme base template onlyBjørn Erik Pedersen
This commit fixes the base template lookup order to match the behaviour of regular templates. ``` 1. <current-path>/<template-name>-baseof.<suffix>, e.g. list-baseof.<suffix>. 2. <current-path>/baseof.<suffix> 3. _default/<template-name>-baseof.<suffix>, e.g. list-baseof.<suffix>. 4. _default/baseof.<suffix> For each of the steps above, it will first look in the project, then, if theme is set, in the theme's layouts folder. ``` Fixes #2783
2014-11-20Move template library into it's own package (tpl). No longer dependent on ↵spf13
hugolib. Can be used externally.
2014-11-13Make Where template-method accept methodname as keybep
This is necessary to make constructs like `{{ range first 1 (where .Data.Pages "Type" "post") }}` -- as Type and Section is methods not fields.
2014-11-02Extend template's mod and modBool functions to accept any int typesTatsushi Demachi
Fixes #575
2014-10-15Make First accept any intbep
TOML and YAML handles integers differently, creating issues when using integer values from configuration or front matter in the First template function. This currently works in YAML (parses into int), but not in TOML (parses into int64). This commit modifies First so it accepts any int. Fixes #551
2014-10-15Add nil-check to Intersectbep
The Intersect template-method would fail if one or both of the lists were nil (post vs page; post has tags, page has not). This commit adds a nil-check and returns an empty result if any of the inputs are nil. See #537
2014-09-22Extend template's basic math functions to accept float, uint and string valuesTatsushi Demachi
2014-08-18Add 'where' template functionTatsushi Demachi
2014-05-10Make template comparison functions handle floatsVincent Batoufflet
2014-04-23Add Disqus support out of the box. Move template/bundle into hugolib.spf13