summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/images/index.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-22 16:47:07 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-22 16:47:07 +0200
commitb95e15694006a16eee41024be88615bda62041cf (patch)
tree3f880d5bc78eaed5b549a50c6cdd219d57e3ac83 /docs/content/en/functions/images/index.md
parent4cac5f5e306b6c301258eb9936094eb910264c9a (diff)
parentf96384a3b596f9bc0a3a035970b09b2c601f0ccb (diff)
Diffstat (limited to 'docs/content/en/functions/images/index.md')
-rw-r--r--docs/content/en/functions/images/index.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/content/en/functions/images/index.md b/docs/content/en/functions/images/index.md
index e7fc50f7e..9cd772e5b 100644
--- a/docs/content/en/functions/images/index.md
+++ b/docs/content/en/functions/images/index.md
@@ -1,12 +1,11 @@
---
title: Image Filters
description: The images namespace provides a list of filters and other image related functions.
-date: 2017-02-01
categories: [functions]
aliases: [/functions/imageconfig/]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [images]
toc: true
---
@@ -46,7 +45,7 @@ images.Text TEXT DICT)
The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.
```go-html-template
-{{ $img := resources.Get "/images/background.png"}}
+{{ $img := resources.Get "/images/background.png" }}
{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"color" "#ffffff"
"size" 60
@@ -61,7 +60,7 @@ You can load a custom font if needed. Load the font as a Hugo `Resource` and set
```go-html-template
{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }}
-{{ $img := resources.Get "/images/background.png"}}
+{{ $img := resources.Get "/images/background.png" }}
{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"font" $font
))}}
@@ -222,6 +221,6 @@ images.ImageConfig PATH
```go-html-template
{{ with (imageConfig "favicon.ico") }}
-favicon.ico: {{.Width}} x {{.Height}}
+favicon.ico: {{ .Width }} x {{ .Height }}
{{ end }}
```