summaryrefslogtreecommitdiffstats
path: root/docs/content/en/hugo-pipes
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/hugo-pipes')
-rwxr-xr-xdocs/content/en/hugo-pipes/introduction.md11
-rwxr-xr-xdocs/content/en/hugo-pipes/scss-sass.md2
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/content/en/hugo-pipes/introduction.md b/docs/content/en/hugo-pipes/introduction.md
index bbafe55b2..a3c956885 100755
--- a/docs/content/en/hugo-pipes/introduction.md
+++ b/docs/content/en/hugo-pipes/introduction.md
@@ -53,6 +53,17 @@ With `resources.GetRemote`, the first argument is a remote URL:
`resources.Get` and `resources.GetRemote` return `nil` if the resource is not found.
+## Copy a Resource
+
+{{< new-in "0.100.0" >}}
+
+`resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things:
+
+```go-html-template
+{{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }}
+<img src="{{ $resized.RelPermalink }}">
+```
+
### Caching
By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given.
diff --git a/docs/content/en/hugo-pipes/scss-sass.md b/docs/content/en/hugo-pipes/scss-sass.md
index 12cebc014..c4a0a5520 100755
--- a/docs/content/en/hugo-pipes/scss-sass.md
+++ b/docs/content/en/hugo-pipes/scss-sass.md
@@ -45,7 +45,7 @@ includePaths [string slice]
: Additional SCSS/SASS include paths. Paths must be relative to the project directory.
```go-html-template
-{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }}
+{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" (slice "node_modules/myscss")) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
```