Link to .html resources

When I have an img or so (e.g. .jpg file) this works well:

<a href="{{ $resource.RelPermalink }}">Resource</a>

The link is displayed fine and hugo places the file in the public/ directory.
However when the resource is an .html file, the link is empty and the file is not included.

How can I fix this?

Hi there, html files are a page-type resource, so it does not get .Permalink: https://gohugo.io/content-management/page-resources/

1 Like