fix docs for getting remote font

Doesn't work with `resources.Get`, need to use `.GetRemote`
This commit is contained in:
Oliver Kamer 2023-01-09 12:05:32 +01:00 committed by Bjørn Erik Pedersen
parent 1f7094b9e6
commit 207e7f0a05

View File

@ -60,7 +60,7 @@ You can load a custom font if needed. Load the font as a Hugo `Resource` and set
```go-html-template ```go-html-template
{{ $font := resources.Get "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }} {{ $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 {{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"font" $font "font" $font