Adding custom CSS and JS to Shopify

后端 未结 5 1163
心在旅途
心在旅途 2020-12-24 06:40

I am working on getting vertical tabs for a page on Shopify, using the \'Atlantic\' theme. As this theme does not have vertical tabs by default, I have used the external JS

5条回答
  •  庸人自扰
    2020-12-24 07:32

    If I understand correctly, the asset_url filter is what you are looking for.

    To include a JS file in a .liquid file, you use:

    {{ 'script.js' | asset_url | script_tag }}
    

    And a CSS file:

    {{ 'style.css' | asset_url | stylesheet_tag }}
    

提交回复
热议问题