resources/images: Make the image cache more robust

Also allow timeout to be set as a duration string, e.g. `30s`.

Fixes #6501
This commit is contained in:
Bjørn Erik Pedersen
2019-11-25 12:49:04 +01:00
parent 031f948f87
commit d6f7a9e28d
11 changed files with 85 additions and 32 deletions

View File

@@ -158,7 +158,7 @@ func (c *goldmarkConverter) Convert(ctx converter.RenderContext) (result convert
name := fmt.Sprintf("goldmark_%s.txt", c.ctx.DocumentID)
filename := filepath.Join(dir, name)
afero.WriteFile(hugofs.Os, filename, ctx.Src, 07555)
err = errors.Errorf("[BUG] goldmark: create an issue on GitHub attaching the file in: %s", filename)
err = errors.Errorf("[BUG] goldmark: %s: create an issue on GitHub attaching the file in: %s", r, filename)
}
}()