summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-01-02 11:58:32 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-01-02 14:25:37 +0100
commitce8a09a4c0661dece931ab1173e4f09e8e04aa38 (patch)
tree870372211e342312d0ab3034ee03285c6f698f9d /hugolib
parent669ada436787311cc5d02dae5b88e60a09adda58 (diff)
resources: Move resource interfaces into its own package
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/collections.go2
-rw-r--r--hugolib/page.go2
-rw-r--r--hugolib/page_output.go2
-rw-r--r--hugolib/page_resource.go2
-rw-r--r--hugolib/pagebundler_handlers.go7
-rw-r--r--hugolib/pages_language_merge_test.go2
-rw-r--r--hugolib/resource_chain_test.go2
-rw-r--r--hugolib/site.go4
8 files changed, 12 insertions, 11 deletions
diff --git a/hugolib/collections.go b/hugolib/collections.go
index b9992c425..cf75d3732 100644
--- a/hugolib/collections.go
+++ b/hugolib/collections.go
@@ -16,7 +16,7 @@ package hugolib
import (
"fmt"
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources/resource"
"github.com/gohugoio/hugo/common/collections"
)
diff --git a/hugolib/page.go b/hugolib/page.go
index 9f09dc9bd..71070d1e8 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -35,7 +35,7 @@ import (
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib/pagemeta"
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources/resource"
"github.com/gohugoio/hugo/output"
"github.com/mitchellh/mapstructure"
diff --git a/hugolib/page_output.go b/hugolib/page_output.go
index 9a6531207..0a3eef9a6 100644
--- a/hugolib/page_output.go
+++ b/hugolib/page_output.go
@@ -24,7 +24,7 @@ import (
"github.com/gohugoio/hugo/tpl"
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources/resource"
"github.com/gohugoio/hugo/media"
diff --git a/hugolib/page_resource.go b/hugolib/page_resource.go
index 808a692da..201076e8b 100644
--- a/hugolib/page_resource.go
+++ b/hugolib/page_resource.go
@@ -14,7 +14,7 @@
package hugolib
import (
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources/resource"
)
var (
diff --git a/hugolib/pagebundler_handlers.go b/hugolib/pagebundler_handlers.go
index fdff76e24..2df1f8765 100644
--- a/hugolib/pagebundler_handlers.go
+++ b/hugolib/pagebundler_handlers.go
@@ -22,7 +22,8 @@ import (
"strings"
"github.com/gohugoio/hugo/helpers"
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources"
+ "github.com/gohugoio/hugo/resources/resource"
)
var (
@@ -255,7 +256,7 @@ func (c *contentHandlers) parsePage(h contentHandler) contentHandler {
// Assign metadata from front matter if set
if len(p.resourcesMetadata) > 0 {
- resource.AssignMetadata(p.resourcesMetadata, p.Resources...)
+ resources.AssignMetadata(p.resourcesMetadata, p.Resources...)
}
}
@@ -309,7 +310,7 @@ func (c *contentHandlers) createResource() contentHandler {
}
resource, err := c.s.ResourceSpec.New(
- resource.ResourceSourceDescriptor{
+ resources.ResourceSourceDescriptor{
TargetPathBuilder: ctx.parentPage.subResourceTargetPathFactory,
SourceFile: ctx.source,
RelTargetFilename: ctx.target,
diff --git a/hugolib/pages_language_merge_test.go b/hugolib/pages_language_merge_test.go
index 6706af3bc..efcfbf04b 100644
--- a/hugolib/pages_language_merge_test.go
+++ b/hugolib/pages_language_merge_test.go
@@ -17,7 +17,7 @@ import (
"fmt"
"testing"
- "github.com/gohugoio/hugo/resource"
+ "github.com/gohugoio/hugo/resources/resource"
"github.com/stretchr/testify/require"
)
diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go
index 0fe9c70c1..f53ab4966 100644
--- a/hugolib/resource_chain_test.go
+++ b/hugolib/resource_chain_test.go
@@ -25,7 +25,7 @@ import (
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/common/loggers"
- "github.com/gohugoio/hugo/resource/resource_transformers/tocss/scss"
+ "github.com/gohugoio/hugo/resources/resource_transformers/tocss/scss"
)
func TestSCSSWithIncludePaths(t *testing.T) {
diff --git a/hugolib/site.go b/hugolib/site.go
index 9c225b332..43b398b70 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -39,7 +39,6 @@ import (
"github.com/gohugoio/hugo/common/hugo"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/publisher"
- "github.com/gohugoio/hugo/resource"
_errors "github.com/pkg/errors"
"github.com/gohugoio/hugo/langs"
@@ -62,6 +61,7 @@ import (
"github.com/gohugoio/hugo/hugolib/pagemeta"
"github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/related"
+ "github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/source"
"github.com/gohugoio/hugo/tpl"
"github.com/spf13/afero"
@@ -760,7 +760,7 @@ func (s *Site) processPartial(events []fsnotify.Event) (whatChanged, error) {
cachePartitions := make([]string, len(events))
for i, ev := range events {
- cachePartitions[i] = resource.ResourceKeyPartition(ev.Name)
+ cachePartitions[i] = resources.ResourceKeyPartition(ev.Name)
if s.isContentDirEvent(ev) {
logger.Println("Source changed", ev)