Add tpl/site and tpl/hugo
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 26 Nov 2018 09:11:22 +0000 (10:11 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 6 Dec 2018 13:37:25 +0000 (14:37 +0100)
commit831d23cb4d1ca99cdc15ed31c8ee1f981497be8f
tree8fe47b1b1b9233448297f8015ce61bbb7da13fc7
parent514e18dc27ce37a0e9a231741d616cf29d50d610
Add tpl/site and tpl/hugo

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
39 files changed:
.gitignore
commands/commandeer.go
commands/genman.go
commands/hugo.go
commands/version.go
common/hugo/hugo.go [new file with mode: 0644]
common/hugo/hugo_test.go [new file with mode: 0644]
common/hugo/site.go [new file with mode: 0644]
common/hugo/vars_extended.go [new file with mode: 0644]
common/hugo/vars_regular.go [new file with mode: 0644]
common/hugo/version.go [new file with mode: 0644]
common/hugo/version_current.go [new file with mode: 0644]
common/hugo/version_test.go [new file with mode: 0644]
deps/deps.go
goreleaser-extended.yml
goreleaser.yml
helpers/general.go
helpers/hugo.go [deleted file]
helpers/hugo_test.go [deleted file]
htesting/test_structs.go [new file with mode: 0644]
hugolib/hugo_info.go [deleted file]
hugolib/hugo_info_test.go [deleted file]
hugolib/hugo_sites.go
hugolib/page.go
hugolib/page_test.go
hugolib/pages_language_merge_test.go
hugolib/site.go
hugolib/template_test.go
i18n/i18n_test.go
magefile.go
releaser/releaser.go
tpl/compare/compare_test.go
tpl/hugo/init.go [new file with mode: 0644]
tpl/hugo/init_test.go [new file with mode: 0644]
tpl/site/init.go [new file with mode: 0644]
tpl/site/init_test.go [new file with mode: 0644]
tpl/tplimpl/template_funcs.go
tpl/tplimpl/template_funcs_test.go
transform/metainject/hugogenerator.go