diff options
Diffstat (limited to 'tpl/cast/docshelper.go')
-rw-r--r-- | tpl/cast/docshelper.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tpl/cast/docshelper.go b/tpl/cast/docshelper.go index 6fc35f3c7..1ee614b10 100644 --- a/tpl/cast/docshelper.go +++ b/tpl/cast/docshelper.go @@ -17,7 +17,7 @@ import ( "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/docshelper" - "github.com/gohugoio/hugo/htesting" + "github.com/gohugoio/hugo/resources/page" "github.com/gohugoio/hugo/tpl/internal" "github.com/spf13/viper" ) @@ -30,7 +30,7 @@ func init() { Cfg: viper.New(), Log: loggers.NewErrorLogger(), BuildStartListeners: &deps.Listeners{}, - Site: htesting.NewTestHugoSite(), + Site: page.NewDummyHugoSite(newTestConfig()), } var namespaces internal.TemplateFuncsNamespaces @@ -47,3 +47,9 @@ func init() { docshelper.AddDocProvider("tpl", docsProvider) } + +func newTestConfig() *viper.Viper { + v := viper.New() + v.Set("contentDir", "content") + return v +} |