Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

Online Store 2.0: JSON templates and improvements to Liquid

Themes

Action required

Themes can now use JSON templates in place of Liquid templates for all template types except for gift_card and robots.txt.

Using the new JSON template files, you can define which sections should appear by default when your theme is first installed, and which order they appear in. Merchants can add, remove or reorder sections of JSON templates using the theme editor.

You can also connect theme settings to dynamic sources to pull dynamic information from the store. Dynamic sources can be metafield values or resource attributes.

Learn more about JSON templates and how to update your themes to use this new architecture.

To see a model of how you can implement JSON templates, take a look at the /templates directory of the Dawn GitHub repo.

We’ve also made other notable improvements to Liquid:

  • Moved theme translations currently defined in the schema into locales/ files.
  • Added Bundled Section Rendering in JavaScript endpoints to offload client-side rendering from themes.
  • Updated specialized theme setting types to return Liquid objects instead of resource handles.
  • Updated filters and attributes for functionality such as preloading critical CSS, adding html attributes to links, and removing items from carts.