diff options
Diffstat (limited to 'docs/content/en/functions/images')
-rw-r--r-- | docs/content/en/functions/images/index.md | 9 |
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 }} ``` |