udpated docs

This commit is contained in:
Nuno Coração 2023-01-14 12:00:23 +00:00
parent fbb78892bf
commit a41437d73a

View file

@ -38,12 +38,12 @@ Hugo has various builtin methods to resize, crop and optimize images.
As an example - in `layouts/partials/article-link/card.html`, you have the following code: As an example - in `layouts/partials/article-link/card.html`, you have the following code:
```go ```go
{{ with .Fill "600x600" }} {{ with .Resize "600x" }}
<div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div> <div class="w-full thumbnail_card nozoom" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }} {{ end }}
``` ```
The default behavior of Hugo here is to use Smartcrop to dynamically set the anchor point (crop placement) on the image and resize it to fill 600x600px. The default behavior of Hugo here is to resize the image to 600px keeping the ratio.
It is worth noting here that default image configurations such as [anchor point](https://gohugo.io/content-management/image-processing/#anchor) can also be set in your [site configuration](https://gohugo.io/content-management/image-processing/#processing-options) as well as in the template itself. It is worth noting here that default image configurations such as [anchor point](https://gohugo.io/content-management/image-processing/#anchor) can also be set in your [site configuration](https://gohugo.io/content-management/image-processing/#processing-options) as well as in the template itself.