aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-24 11:51:16 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-24 16:41:18 +0100
commit189b72331e02a17e25f5102af02486d25e27e826 (patch)
tree5b9b0c74c19acaa91214756df47472cc18cea76f /resources
parentb2b7bfdd3abfd389d20e59b256104dd06bbcd951 (diff)
downloadhugo-189b72331e02a17e25f5102af02486d25e27e826.tar.gz
hugo-189b72331e02a17e25f5102af02486d25e27e826.zip
tocss: Fix the import resolving from absolute to relative assets paths
Fixes #12137
Diffstat (limited to 'resources')
-rw-r--r--resources/resource_transformers/tocss/dartsass/transform.go2
-rw-r--r--resources/resource_transformers/tocss/scss/tocss.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/resources/resource_transformers/tocss/dartsass/transform.go b/resources/resource_transformers/tocss/dartsass/transform.go
index a9600f380..17f16a688 100644
--- a/resources/resource_transformers/tocss/dartsass/transform.go
+++ b/resources/resource_transformers/tocss/dartsass/transform.go
@@ -144,7 +144,7 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
var pathDir string
if isURL {
var found bool
- prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), false)
+ prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), true)
if !found {
// Not a member of this filesystem, let Dart Sass handle it.
diff --git a/resources/resource_transformers/tocss/scss/tocss.go b/resources/resource_transformers/tocss/scss/tocss.go
index a3f2a5289..3a46e6016 100644
--- a/resources/resource_transformers/tocss/scss/tocss.go
+++ b/resources/resource_transformers/tocss/scss/tocss.go
@@ -86,7 +86,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
if prev == "stdin" {
prevDir = baseDir
} else {
- prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev), false)
+ prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev), true)
if prevDir == "" {
// Not a member of this filesystem. Let LibSASS handle it.