Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
{% # Inlined CSS Variables %}
{% render 'css-variables' %}

{% comment %}
Font preloading:
1. Preconnect to font CDN for faster connection
2. Preload only the critical font variant (base weight)
3. Additional variants load on-demand via @font-face
{% endcomment %}
{% unless settings.type_primary_font.system? %}
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>

{% comment %} Preload the base font variant for initial page render {% endcomment %}
{{ settings.type_primary_font | font_url | preload_tag: as: 'font', crossorigin: 'anonymous' }}
{% endunless %}

{% # Load and preload the critical CSS %}
{{ 'critical.css' | asset_url | stylesheet_tag: preload: true }}

Expand Down