mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user