diff options
Diffstat (limited to 'docs/content/en/hugo-pipes')
-rwxr-xr-x | docs/content/en/hugo-pipes/introduction.md | 12 | ||||
-rwxr-xr-x | docs/content/en/hugo-pipes/scss-sass.md | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/content/en/hugo-pipes/introduction.md b/docs/content/en/hugo-pipes/introduction.md index 116523fd5..e83741f74 100755 --- a/docs/content/en/hugo-pipes/introduction.md +++ b/docs/content/en/hugo-pipes/introduction.md @@ -133,6 +133,18 @@ You can also change the request method and set the request body: Remote resources fetched with `resources.GetRemote` will be cached on disk. See [Configure File Caches](/getting-started/configuration/#configure-file-caches) for details. + +## 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 }}"> +``` + ## Asset directory Asset files must be stored in the asset directory. This is `/assets` by default, but can be configured via the configuration file's `assetDir` key. diff --git a/docs/content/en/hugo-pipes/scss-sass.md b/docs/content/en/hugo-pipes/scss-sass.md index 169c473d2..4e39207fa 100755 --- a/docs/content/en/hugo-pipes/scss-sass.md +++ b/docs/content/en/hugo-pipes/scss-sass.md @@ -29,6 +29,9 @@ transpiler [string] targetPath [string] : If not set, the resource's target path will be the asset file original path with its extension replaced by `.css`. +vars [map] +: Map of key/value pairs that will be available in the `hugo:vars` namespace, e.g. with `@use "hugo:vars" as v;` or (globally) with `@import "hugo:vars";` {{< new-in "0.109.0" >}} + outputStyle [string] : Default is `nested` (LibSass) and `expanded` (Dart Sass). Other available output styles for LibSass are `expanded`, `compact` and `compressed`. Dart Sass only supports `expanded` and `compressed`. |