Permalink
Browse files

tpl: Fix the docshelper

  • Loading branch information...
bep committed Nov 2, 2018
1 parent f844618 commit 61f210dd7abe5de77c27dc6a6995a3ad5e77afa1
Showing with 10 additions and 1 deletion.
  1. +6 −1 tpl/cast/docshelper.go
  2. +4 −0 tpl/resources/resources.go
View
@@ -14,6 +14,7 @@
package cast
import (
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/docshelper"
"github.com/gohugoio/hugo/tpl/internal"
@@ -24,7 +25,11 @@ import (
func init() {
docsProvider := func() map[string]interface{} {
docs := make(map[string]interface{})
d := &deps.Deps{Cfg: viper.New()}
d := &deps.Deps{
Cfg: viper.New(),
Log: loggers.NewErrorLogger(),
BuildStartListeners: &deps.Listeners{},
}
var namespaces internal.TemplateFuncsNamespaces
@@ -34,6 +34,10 @@ import (
// New returns a new instance of the resources-namespaced template functions.
func New(deps *deps.Deps) (*Namespace, error) {
if deps.ResourceSpec == nil {
return &Namespace{}, nil
}
scssClient, err := scss.New(deps.BaseFs.Assets, deps.ResourceSpec)
if err != nil {
return nil, err

0 comments on commit 61f210d

Please sign in to comment.