Hi,
I ran theme-check on vanilla dawn theme and got a bunch of issues such as:
layout/password.liquid#L178
[AssetPreload] For better performance, prefer using the preload_tag filter
My questions:
-
why dawn don’t provide a clean base line without any theme-check issues?
-
how to fix this issue?
The offending row is:
<link rel="preload" as="font" href="{{ settings.type_body_font | font_url }}" type="font/woff2" crossorigin>
github copilot gives
{{ settings.type_header_font | font_url | preload_tag: ‘font/woff2’, crossorigin: true }}
which throws error “Liquid error (line 1): Arguments must be provided as keyword arguments.” when I tried it in https://shopify.dev/docs/api/liquid/filters/asset_url. Not sure how to migrate this to preload tag without losing any information from the original statement.
Plus, preload-tag instruction says:
The input to this filter must be a URL from one of the following filters:
But this offending code is about font_url. So why theme-check complain if preload-tag cannot be used for font_url?
Thanks for any hints.
