hugo/commands
Bjørn Erik Pedersen a03c631c42
Rework template handling for function and map lookups
This is a big commit, but it deletes lots of code and simplifies a lot.

* Resolving the template funcs at execution time means we don't have to create template clones per site
* Having a custom map resolver means that we can remove the AST lower case transformation for the special lower case Params map

Not only is the above easier to reason about, it's also faster, especially if you have more than one language, as in the benchmark below:

```
name                          old time/op    new time/op    delta
SiteNew/Deep_content_tree-16    53.7ms ± 0%    48.1ms ± 2%  -10.38%  (p=0.029 n=4+4)

name                          old alloc/op   new alloc/op   delta
SiteNew/Deep_content_tree-16    41.0MB ± 0%    36.8MB ± 0%  -10.26%  (p=0.029 n=4+4)

name                          old allocs/op  new allocs/op  delta
SiteNew/Deep_content_tree-16      481k ± 0%      410k ± 0%  -14.66%  (p=0.029 n=4+4)
```

This should be even better if you also have lots of templates.

Closes #6594
2019-12-12 10:04:35 +01:00
..
check.go commands: Make the limit command work again 2018-04-11 09:50:19 +02:00
check_darwin.go commands: Make the limit command work again 2018-04-11 09:50:19 +02:00
commandeer.go Add some more output if loading modules takes time 2019-11-21 18:11:07 +01:00
commands.go commands: Use HUGO_ENV if set 2019-11-25 19:12:14 +01:00
commands_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
config.go commands: Add "hugo config mounts" command 2019-07-31 12:10:05 +02:00
convert.go Add Hugo Modules 2019-07-24 09:35:53 +02:00
deploy.go deploy: Add ability to invalidate Google Cloud CDN 2019-10-03 16:53:45 +02:00
env.go commands: Make the hugo command non-global 2018-04-11 09:50:19 +02:00
gen.go commands: Make the hugo command non-global 2018-04-11 09:50:19 +02:00
genautocomplete.go commands: Make the hugo command non-global 2018-04-11 09:50:19 +02:00
genchromastyles.go Add Goldmark as the new default markdown handler 2019-11-23 14:12:24 +01:00
gendoc.go commands: Add basic server test 2018-04-11 09:51:07 +02:00
gendocshelper.go commands: Make the hugo command non-global 2018-04-11 09:50:19 +02:00
genman.go Add tpl/site and tpl/hugo 2018-12-06 14:37:25 +01:00
helpers.go commands: Only show Ansi escape codes if in a terminal 2018-10-26 14:33:44 +02:00
hugo.go Add some more output if loading modules takes time 2019-11-21 18:11:07 +01:00
hugo_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
hugo_windows.go Update hugo_windows.go 2018-07-22 00:09:46 +02:00
import_jekyll.go commands: Fix jekyll metadata import on individual posts 2019-11-25 09:46:44 +01:00
import_jekyll_test.go commands: Fix jekyll metadata import on individual posts 2019-11-25 09:46:44 +01:00
limit_darwin.go Adjust rlimit logic 2019-04-07 00:53:55 +02:00
limit_others.go commands: Make the limit command work again 2018-04-11 09:50:19 +02:00
list.go commands: Create new 'hugo list all' command 2019-05-25 00:09:51 +02:00
list_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
mod.go commands: Make sure the hugo field is always initialized before it's used 2019-08-15 09:33:47 +02:00
new.go commands: Make sure the hugo field is always initialized before it's used 2019-08-15 09:33:47 +02:00
new_content_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
new_site.go commands: Add hint when dir not empty 2019-11-11 21:38:10 +01:00
new_theme.go commands: Make sure the hugo field is always initialized before it's used 2019-08-15 09:33:47 +02:00
release.go commands: Re-add the missing releaser command 2018-04-16 08:23:32 +02:00
release_noop.go commands: Re-add the missing releaser command 2018-04-16 08:23:32 +02:00
server.go Rework template handling for function and map lookups 2019-12-12 10:04:35 +01:00
server_errors.go commands: Fix recently broken error template 2018-11-03 16:55:45 +01:00
server_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
static_syncer.go commands: Make sure the hugo field is always initialized before it's used 2019-08-15 09:33:47 +02:00
version.go Add tpl/site and tpl/hugo 2018-12-06 14:37:25 +01:00