Final answer:
To link Liquid templates to stylesheets on a custom theme, the 'stylesheet_link_tag' filter should be used, which creates a link tag to the stylesheet in the theme's assets folder.
Step-by-step explanation:
To link a Liquid template to stylesheets on a merchant's custom theme in Shopify, you would use the stylesheet_link_tag filter. This filter generates a link tag that points to a stylesheet in your theme's assets folder. It is designed specifically to handle stylesheet files, ensuring they are properly linked with respect to the content delivery network (CDN) and cache settings that Shopify utilizes.
Here is an example of how to use the filter in a Liquid template:
{% stylesheet_link_tag 'theme' %}
This code will create a HTML link element that connects the 'theme.css' file from the theme's assets to the template, which enables the styles written within that CSS file to be applied to the Liquid template.