mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
resources: Remove unused interface
This commit is contained in:
@@ -905,6 +905,7 @@ func (h *HugoSites) processPartialFileEvents(ctx context.Context, l logg.LevelLo
|
|||||||
handleChange := func(pathInfo *paths.Path, delete, isDir bool) {
|
handleChange := func(pathInfo *paths.Path, delete, isDir bool) {
|
||||||
switch pathInfo.Component() {
|
switch pathInfo.Component() {
|
||||||
case files.ComponentFolderContent:
|
case files.ComponentFolderContent:
|
||||||
|
logger.Println("Source changed", pathInfo.Path())
|
||||||
isContentDataFile := pathInfo.IsContentData()
|
isContentDataFile := pathInfo.IsContentData()
|
||||||
if !isContentDataFile {
|
if !isContentDataFile {
|
||||||
if ids := h.pageTrees.collectAndMarkStaleIdentities(pathInfo); len(ids) > 0 {
|
if ids := h.pageTrees.collectAndMarkStaleIdentities(pathInfo); len(ids) > 0 {
|
||||||
|
@@ -535,12 +535,6 @@ func (p *pageState) renderResources() error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, isWrapper := r.(resource.ResourceWrapper); isWrapper {
|
|
||||||
// Skip resources that are wrapped.
|
|
||||||
// These gets published on its own.
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
src, ok := r.(resource.Source)
|
src, ok := r.(resource.Source)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("resource %T does not support resource.Source", r)
|
return fmt.Errorf("resource %T does not support resource.Source", r)
|
||||||
|
@@ -81,11 +81,6 @@ type ResourceWithoutMeta interface {
|
|||||||
ResourceDataProvider
|
ResourceDataProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceWrapper interface {
|
|
||||||
UnwrappedResource() Resource
|
|
||||||
WrapResource(Resource) ResourceWrapper
|
|
||||||
}
|
|
||||||
|
|
||||||
type ResourceTypeProvider interface {
|
type ResourceTypeProvider interface {
|
||||||
// ResourceType is the resource type. For most file types, this is the main
|
// ResourceType is the resource type. For most file types, this is the main
|
||||||
// part of the MIME type, e.g. "image", "application", "text" etc.
|
// part of the MIME type, e.g. "image", "application", "text" etc.
|
||||||
|
Reference in New Issue
Block a user