Skip to content

Commit 2b15255

Browse files
committed
Only preload woff2 font files.
1 parent ce5ea61 commit 2b15255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

_headers

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ Add resource hints for site-wide font faces.
109109
{% for family in site.font-face %}
110110
{% for style in family[1] %}
111111
{% for href in style[1] %}
112-
{% capture hint %}<{{ href }}>; rel=preload; as=font; pr=1.0; crossorigin{% endcapture %}
113-
{% assign all = all | push:hint %}
112+
{% if href contains '.woff2' %}
113+
{% capture hint %}<{{ href }}>; rel=preload; as=font; pr=1.0; crossorigin{% endcapture %}
114+
{% assign all = all | push:hint %}
115+
{% endif %}
114116
{% endfor %}
115117
{% endfor %}
116118
{% endfor %}

0 commit comments

Comments
 (0)