diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-24 11:51:16 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-24 16:41:18 +0100 |
commit | 189b72331e02a17e25f5102af02486d25e27e826 (patch) | |
tree | 5b9b0c74c19acaa91214756df47472cc18cea76f /resources | |
parent | b2b7bfdd3abfd389d20e59b256104dd06bbcd951 (diff) | |
download | hugo-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.go | 2 | ||||
-rw-r--r-- | resources/resource_transformers/tocss/scss/tocss.go | 2 |
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. |