HUGO

[OT] Workaround unsafe-inline css

I’m using the ananke theme, which uses inline styles for multiple things, e.g. header images.
My host CSP does not allow unsafe-inline css. How do I work around this issue?

Is it possible to somehow include hashes for inline css?
Alternatively, can I generate and include stylesheets from a partial? If so, how would I identify the element in css?

Relevant lines from theme partial page-header

  {{ $featured_image := (trim $featured_image "/") | absURL }}
  <header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
1 Like

You need to talk to your host.