Adding animations to Hugo site

I am trying to add animation to Hugo site but nothing is happening.

I would like to add animation to this div

 {{ with .Site.Data.homepage.head }}
    <div class="col-12 text-center" data-duration-in=".3" data-animation-in="{{ .animation }}" data-delay-in=".1">
 {{ end }}

homepage.yml

head:
  enable : true
  animation : "fadeInUp"

What do I miss?
Any advice is highly appreciated :slight_smile:

Using with isn’t going to tell you why it is failing, because it is like an if statement. Simply try {{ .Site.Data.homepage.head.animation }} in a template and let me know what you get. Does it give you the value you’re looking for?

I did and I got this error:

can't evaluate field animation in type interface {}

Hi there,

On first glance your code looks like it should work. Do you have your code in a repo somewhere we can have a look at? Have a read about Requesting Help to see how you can help us help you.

1 Like

Is this code in a partial?

This thread should be really renamed in order to get the attention of people who can help and a repo would help. This yaml syntax should work.