How can I include asset files into a .json template?

Hi all,

not sure if this makes any sense but on my old theme, my template files were in .liquid and had the style and js from assets included. I upgraded to a new theme that requires template file to be .json. Can I then includes the files from the asset too? How so?

Kinda have this now but I know it doesnt work on .json:

{{ ‘preview_style.css’ | asset_url | stylesheet_tag }}

Thanks

Depending on where you need this, either add it to Layout or to relevant Section files.

1 Like

I am applying it to a custom product I created.

Should I add it to main-product.liquid when I render the product snippet?