diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-12-10 16:22:08 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-12-12 21:43:17 +0100 |
commit | e293e7ca6dcc34cded7eb90a644b5c720c2179cf (patch) | |
tree | dee8e8d272660d23aa7b76576e8267fc70c34f78 /resources/resource_factories | |
parent | 157d86414d43f6801e2a6996108f67d28679eac5 (diff) | |
download | hugo-e293e7ca6dcc34cded7eb90a644b5c720c2179cf.tar.gz hugo-e293e7ca6dcc34cded7eb90a644b5c720c2179cf.zip |
Add js.Batch
Fixes #12626
Closes #7499
Closes #9978
Closes #12879
Closes #13113
Fixes #13116
Diffstat (limited to 'resources/resource_factories')
-rw-r--r-- | resources/resource_factories/create/create.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/resources/resource_factories/create/create.go b/resources/resource_factories/create/create.go index 2d868bd15..7dd26f4c0 100644 --- a/resources/resource_factories/create/create.go +++ b/resources/resource_factories/create/create.go @@ -143,16 +143,18 @@ func (c *Client) Get(pathname string) (resource.Resource, error) { return nil, err } - pi := fi.(hugofs.FileMetaInfo).Meta().PathInfo + meta := fi.(hugofs.FileMetaInfo).Meta() + pi := meta.PathInfo return c.rs.NewResource(resources.ResourceSourceDescriptor{ LazyPublish: true, OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) { return c.rs.BaseFs.Assets.Fs.Open(filename) }, - Path: pi, - GroupIdentity: pi, - TargetPath: pathname, + Path: pi, + GroupIdentity: pi, + TargetPath: pathname, + SourceFilenameOrPath: meta.Filename, }) }) } @@ -196,10 +198,11 @@ func (c *Client) match(name, pattern string, matchFunc func(r resource.Resource) OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) { return meta.Open() }, - NameNormalized: meta.PathInfo.Path(), - NameOriginal: meta.PathInfo.Unnormalized().Path(), - GroupIdentity: meta.PathInfo, - TargetPath: meta.PathInfo.Unnormalized().Path(), + NameNormalized: meta.PathInfo.Path(), + NameOriginal: meta.PathInfo.Unnormalized().Path(), + GroupIdentity: meta.PathInfo, + TargetPath: meta.PathInfo.Unnormalized().Path(), + SourceFilenameOrPath: meta.Filename, }) if err != nil { return true, err |