Skip to content

Commit ce893b3

Browse files
committed
Snippet for theme scripts
1 parent 0aaff73 commit ce893b3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

layout/theme.liquid

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919
{% endif %}
2020

2121
{%- render 'meta-tags' -%}
22-
23-
<script src="{{ 'pubsub.js' | asset_url }}" defer="defer"></script>
24-
<script src="{{ 'global.js' | asset_url }}" defer="defer"></script>
25-
<script src="{{ 'animations.js' | asset_url }}" defer="defer"></script>
26-
27-
{{ content_for_header }}
22+
{%- render 'scripts' -%}
2823

2924
{% style %}
3025
{% for scheme in settings.color_schemes -%}
@@ -71,6 +66,7 @@
7166
{% endstyle %}
7267

7368
{{ 'base.css' | asset_url | stylesheet_tag }}
69+
{{ 'carousel.css' | asset_url | stylesheet_tag }}
7470
{{ 'tailwind.min.css' | asset_url | stylesheet_tag }}
7571

7672
{%- comment -%}
@@ -86,6 +82,8 @@
8682
moneyFormat: {{ shop.money_format | json }}
8783
};
8884
</script>
85+
86+
{{ content_for_header }}
8987
</head>
9088
<body>
9189
{% sections 'header-group' %}

snippets/scripts.liquid

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script src="{{ 'pubsub.js' | asset_url }}" defer="defer"></script>
2+
<script src="{{ 'global.js' | asset_url }}" defer="defer"></script>
3+
<script src="{{ 'animations.js' | asset_url }}" defer="defer"></script>
4+
5+
<script src="{{ 'carousel.js' | asset_url }}" type="module" fetchpriority="low"></script>

0 commit comments

Comments
 (0)