mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Fix some recently broken embedded templates
And add tests for them. Fixes #4757
This commit is contained in:
6
deps/deps.go
vendored
6
deps/deps.go
vendored
@@ -23,6 +23,9 @@ type Deps struct {
|
||||
// The logger to use.
|
||||
Log *jww.Notepad `json:"-"`
|
||||
|
||||
// Used to log errors that may repeat itself many times.
|
||||
DistinctErrorLog *helpers.DistinctLogger
|
||||
|
||||
// The templates to use. This will usually implement the full tpl.TemplateHandler.
|
||||
Tmpl tpl.TemplateFinder `json:"-"`
|
||||
|
||||
@@ -137,9 +140,12 @@ func New(cfg DepsCfg) (*Deps, error) {
|
||||
timeoutms = 3000
|
||||
}
|
||||
|
||||
distinctErrorLogger := helpers.NewDistinctLogger(logger.ERROR)
|
||||
|
||||
d := &Deps{
|
||||
Fs: fs,
|
||||
Log: logger,
|
||||
DistinctErrorLog: distinctErrorLogger,
|
||||
templateProvider: cfg.TemplateProvider,
|
||||
translationProvider: cfg.TranslationProvider,
|
||||
WithTemplate: cfg.WithTemplate,
|
||||
|
Reference in New Issue
Block a user