handleChange := func(pathInfo *paths.Path, delete, isDir bool) {
switch pathInfo.Component() {
case files.ComponentFolderContent:
+ logger.Println("Source changed", pathInfo.Path())
isContentDataFile := pathInfo.IsContentData()
if !isContentDataFile {
if ids := h.pageTrees.collectAndMarkStaleIdentities(pathInfo); len(ids) > 0 {
continue
}
- if _, isWrapper := r.(resource.ResourceWrapper); isWrapper {
- // Skip resources that are wrapped.
- // These gets published on its own.
- continue
- }
-
src, ok := r.(resource.Source)
if !ok {
return fmt.Errorf("resource %T does not support resource.Source", r)
ResourceDataProvider
}
-type ResourceWrapper interface {
- UnwrappedResource() Resource
- WrapResource(Resource) ResourceWrapper
-}
-
type ResourceTypeProvider interface {
// ResourceType is the resource type. For most file types, this is the main
// part of the MIME type, e.g. "image", "application", "text" etc.