diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-01-15 22:40:39 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-01-17 18:22:33 +0300 |
commit | 20c9b6ec81171d1c586ea31d5d08b40b0edaffc6 (patch) | |
tree | 990d2709c1333663dce2ff97f16f8791fef3bac9 /resource/image.go | |
parent | f8a119b606d55aa4f31f16e5a3cadc929c99e4f8 (diff) |
resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods:
* Name
* Title
* Params
All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.
Fixes #4244
Diffstat (limited to 'resource/image.go')
-rw-r--r-- | resource/image.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resource/image.go b/resource/image.go index e9a617f97..7ec65f3bc 100644 --- a/resource/image.go +++ b/resource/image.go @@ -208,7 +208,7 @@ func (i *Image) doWithImageConfig(action, spec string, f func(src image.Image, c key := i.relTargetPathForRel(i.filenameFromConfig(conf), false) - return i.spec.imageCache.getOrCreate(i.spec, key, func(resourceCacheFilename string) (*Image, error) { + return i.spec.imageCache.getOrCreate(i, key, func(resourceCacheFilename string) (*Image, error) { ci := i.clone() ci.setBasePath(conf) |