Add logo to header

Hi,

I am trying to add a logo to my header that will appear on all pages. It works for the home page but not for any of the other pages.

The same problem also happens with the scripts in the footer. They work on the home page but not on any other pages.

I am new to Hugo, Help appreciated.

<a class="navbar-brand" href="{{.Site.BaseURL}}"><img src="img/test-vector.svg" alt="Test"></a>

I worked it out

<img src="{{ "img/test.svg" | absURL }}" alt="test">

Since Hugo writes all markup (including XML), you can even embed the SVG directly as a partial in your layout. One fewer http request AND the ability to style it with CSS. Might be handy:)

1 Like

I am using hugo_robust theme …any hint how to add logo in it ?