diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-03-24 08:12:51 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-03-25 16:40:36 +0100 |
commit | 9202117ba08286975c723130db60a1c69ff249a0 (patch) | |
tree | 2b5bc26059e47045edaa4bb5ddeb89f4da6a68cd /hugolib/page.go | |
parent | a6fa290f67a858e813480cd19bd5e8e1088771d2 (diff) | |
download | hugo-9202117ba08286975c723130db60a1c69ff249a0.tar.gz hugo-9202117ba08286975c723130db60a1c69ff249a0.zip |
resources: Add more details to .Err
This commit adds a .Data object (a map with `Body`, `StatusCode` etc.) to the .Err returned from `resources.GetRemote`, which means you can now do:
```
{{ with .Err }}
{{ range $k, $v := .Data }}
{{ end }}
{{ end }}
```
Fixes #9708
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index 2fddaa299..77165c072 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -133,7 +133,7 @@ func (p *pageState) reusePageOutputContent() bool { return p.pageOutputTemplateVariationsState.Load() == 1 } -func (p *pageState) Err() error { +func (p *pageState) Err() resource.ResourceError { return nil } |