diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-05-04 17:53:56 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-05-04 23:12:10 +0200 |
commit | 34ad9a4f178fcf50abe7246ad9d30b294327da16 (patch) | |
tree | 897c9094913420fb1bb6a413332f946d298b8d4f /magefile.go | |
parent | 914cc85e22af2e6c28f24a5fc70de94e4b9f1b1b (diff) | |
download | hugo-34ad9a4f178fcf50abe7246ad9d30b294327da16.tar.gz hugo-34ad9a4f178fcf50abe7246ad9d30b294327da16.zip |
tpl/tplimpl: Extract internal templates
Having them in separate files should make maintainance easier.
When adding new or making changes to the templates:
```bash
mage generate
```
This will get the Go code in sync.
Fixes #4457
Diffstat (limited to 'magefile.go')
-rw-r--r-- | magefile.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/magefile.go b/magefile.go index 883f96620..0cede2697 100644 --- a/magefile.go +++ b/magefile.go @@ -8,6 +8,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "path/filepath" "runtime" "strings" @@ -67,6 +68,10 @@ func flagEnv() map[string]string { } } +func Generate() error { + return sh.RunWith(flagEnv(), goexe, "generate", path.Join(packageName, "tpl/tplimpl/embedded/generate")) +} + // Build hugo without git info func HugoNoGitInfo() error { ldflags = noGitLdflags |