mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl: Refactor package
Now: * The template API lives in /tpl * The rest lives in /tpl/tplimpl This is bound te be more improved in the future. Updates #2701
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
bp "github.com/spf13/hugo/bufferpool"
|
||||
"github.com/spf13/hugo/helpers"
|
||||
"github.com/spf13/hugo/tplapi"
|
||||
"github.com/spf13/hugo/tpl"
|
||||
)
|
||||
|
||||
// ShortcodeWithPage is the "." context in a shortcode template.
|
||||
@@ -541,7 +541,7 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
|
||||
return source, nil
|
||||
}
|
||||
|
||||
func getShortcodeTemplate(name string, t tplapi.Template) *template.Template {
|
||||
func getShortcodeTemplate(name string, t tpl.Template) *template.Template {
|
||||
if x := t.Lookup("shortcodes/" + name + ".html"); x != nil {
|
||||
return x
|
||||
}
|
||||
|
Reference in New Issue
Block a user