summaryrefslogtreecommitdiffstats
path: root/resources/resource_transformers/tocss/scss
diff options
context:
space:
mode:
Diffstat (limited to 'resources/resource_transformers/tocss/scss')
-rw-r--r--resources/resource_transformers/tocss/scss/client.go5
-rw-r--r--resources/resource_transformers/tocss/scss/tocss.go3
2 files changed, 4 insertions, 4 deletions
diff --git a/resources/resource_transformers/tocss/scss/client.go b/resources/resource_transformers/tocss/scss/client.go
index 2028163ff..aead6279b 100644
--- a/resources/resource_transformers/tocss/scss/client.go
+++ b/resources/resource_transformers/tocss/scss/client.go
@@ -16,7 +16,7 @@ package scss
import (
"regexp"
- "github.com/gohugoio/hugo/helpers"
+ "github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/hugolib/filesystems"
"github.com/gohugoio/hugo/resources"
"github.com/spf13/afero"
@@ -37,7 +37,6 @@ func New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error)
}
type Options struct {
-
// Hugo, will by default, just replace the extension of the source
// to .css, e.g. "scss/main.scss" becomes "scss/main.css". You can
// control this by setting this, e.g. "styles/main.css" will create
@@ -73,7 +72,7 @@ func DecodeOptions(m map[string]any) (opts Options, err error) {
err = mapstructure.WeakDecode(m, &opts)
if opts.TargetPath != "" {
- opts.TargetPath = helpers.ToSlashTrimLeading(opts.TargetPath)
+ opts.TargetPath = paths.ToSlashTrimLeading(opts.TargetPath)
}
return
diff --git a/resources/resource_transformers/tocss/scss/tocss.go b/resources/resource_transformers/tocss/scss/tocss.go
index 1018ea02e..a4c4e6d8e 100644
--- a/resources/resource_transformers/tocss/scss/tocss.go
+++ b/resources/resource_transformers/tocss/scss/tocss.go
@@ -20,7 +20,6 @@ import (
"fmt"
"io"
"path"
-
"path/filepath"
"strings"
@@ -29,6 +28,7 @@ import (
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/media"
"github.com/gohugoio/hugo/resources"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/internal/sass"
@@ -115,6 +115,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
fi, err := t.c.sfs.Fs.Stat(filenameToCheck)
if err == nil {
if fim, ok := fi.(hugofs.FileMetaInfo); ok {
+ ctx.DependencyManager.AddIdentity(identity.CleanStringIdentity(filenameToCheck))
return fim.Meta().Filename, "", true
}
}