handle := func(info hugofs.FileMetaInfo) (bool, error) {
meta := info.Meta()
+
r, err := c.rs.NewResource(resources.ResourceSourceDescriptor{
LazyPublish: true,
OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) {
return meta.Open()
},
- GroupIdentity: meta.PathInfo,
- TargetPath: meta.PathInfo.Unnormalized().Path(),
+ NameNormalized: meta.PathInfo.Name(),
+ NameOriginal: meta.PathInfo.Unnormalized().Name(),
+ GroupIdentity: meta.PathInfo,
+ TargetPath: meta.PathInfo.Unnormalized().Path(),
})
if err != nil {
return true, err
-- assets/b.txt --
I am b.txt
-- layouts/index.html --
+Home.
{{ with resources.ByType "text" }}
{{ with .Get "a.txt" }}
{{ .Publish }}
b := hugolib.Test(t, files)
- b.AssertFileExists("public/index.html", true)
b.AssertFileExists("public/a.txt", true) // failing test
b.AssertFileExists("public/b.txt", true) // failing test
}