Problem/Motivation
Olivero ships a preload template with the following:
<link rel="preload" href="{{ olivero_path }}/fonts/metropolis/Metropolis-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivero_path }}/fonts/metropolis/Metropolis-SemiBold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivero_path }}/fonts/metropolis/Metropolis-Bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ olivero_path }}/fonts/lora/lora-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
This is to support fonts.css which is loaded as part of the global-styling library.
I think we should look at generic support for adding link tags as part of library definitions at the same level as CSS and JS. This can then be added to the HTML head via the same mechanism as #attached['html_head']. Via that, we'd then be able to support prefetch, preload, and dns-prefetch and possibly other things.
Steps to reproduce
Proposed resolution
Add support to the libraries/assets API.
Convert Olivero to use it (either in this issue or a follow-up).