Basker Docs

Block Studio

How Design → Blocks shows the blocks of a custom theme, how to edit a theme block in Block Studio, and what a theme developer needs to know about code blocks

For the parts of Block Studio that editors also use (the assistant, the preview, Content and Accessibility, Problems, the More menu, saving, AI credits, and permissions), see Block Studio. This page covers what is specific to a custom theme.

Theme blocks in Design → Blocks

Theme blocks in Design → Blocks lists the files in blocks/ of the selected custom theme. Select a theme block to see its fields and its Liquid source with the {% schema %}. You need permission to manage themes to see the source. Copy copies the source.

Edit in Block Studio opens the theme block in Block Studio. The button needs permission to manage themes and Code Blocks → Edit.

Edit a theme block

A theme block needs a custom theme. Block Studio cannot edit the blocks of a no-code theme.

  • The preview renders the block in a template that allows it, with real content. Choose the template and the record above the preview. The theme list next to them opens the same block in another theme.
  • Fields edits the settings of the {% schema %} as a form: the Label, Field name, Type, options, nested fields, Required, and the default value. Full schema JSON shows the complete schema. The schema must be a valid JSON object before you can preview or save.
  • Code edits the Liquid source.
  • Save draft saves a new draft revision of the theme. The live theme does not change until you deploy it.

For what a save changes in the theme bundle, how to keep Studio changes in your source, and themes connected to GitHub, see Studio and custom themes.

Code blocks and the renderer

A code block renders with Liquid or with React. The renderer of a new code block is Liquid on a site with a custom theme and React on a site with a no-code theme. You cannot change the renderer after you save the block. While Block Studio generates a block, it validates the fields, then checks the Liquid syntax or compiles the React component.

The Handle of a code block is made from the name if you leave it empty. You cannot change it after you save the block.

Export a code block to a theme

Export to theme in the More menu shows for a Liquid code block only. It downloads the block as a theme block file with a {% schema %} built from the fields of the block. Basker validates the file when you upload the theme.

On this page