I’m a bit perplexed by this use case for hugo pipelines. This is for a theme I’m farting around with, objectives are:
- Desire to use pipelines so I can compute fingerprints on all SRI applicable assets
- Fingerprinted css makes a call to static content (in this case its the
woff2
file that fontawesome references)
Naturally the “use a cdn” suggestion isn’t going to help because I’m trying to understand this use case (using pipelines) when there is dependent static content.
So I have placed the fontawesome content in assets
and I’m able to successfully load the css with fingerprint using the following:
{{ $fa := resources.Get "fontawesome/web-fonts-with-css/css/fontawesome-all.css" | minify | fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $fa.Permalink }}" integrity="{{ $fa.Data.Integrity }}">
However the icons from fontawesome don’t render because they are making a request for the static content fontawesome/web-fonts-with-css/webfonts/fa-solid-900.woff2
. Now if I place a completely duplicate copy of fontaewsome in static
then everything works fine… it just feels like having completely duplicate content in assets
and static
doesn’t make sense and that I’m breaking a paradigm.