Basker Docs

Studio and custom themes

How Block Studio, Template Studio, and Layout Studio change the files of a custom theme, and how to keep those changes in your source

Block Studio, Template Studio, and Layout Studio edit the Liquid files of a custom theme in the admin. Each save changes the theme bundle that Basker stores, in the same way as an upload of a new ZIP file.

What each studio edits

StudioOpens fromFiles
Block StudioEdit in Block Studio on a block in Design → BlocksOne file in blocks/: the Liquid source and the {% schema %}
Template StudioDesign → TemplatesFiles in templates/ that end in .liquid. It can also create a template file.
Layout StudioDesign → LayoutsFiles in layouts/ that end in .liquid. It can also create a layout file.

A studio cannot change snippets, assets, config/ files, or locale files. Block Studio cannot change the name of a block schema: the save fails with Block identity cannot change in Studio. See Block schema.

The studios work only on custom themes. A no-code theme has no Liquid files to edit.

What a save does

  1. Basker takes the current draft bundle of the theme and replaces or adds the one file.
  2. Basker validates the complete bundle with the rules of a ZIP upload. A critical error stops the save with Theme validation failed: ....
  3. Basker stores the bundle as a new draft revision of the theme. The published theme does not change.

Deploy the theme to make the change live. The manifestRevision of a Studio save starts with studio:.

If the draft changed after the studio opened, for example after an upload or a save in another tab, the save fails with 409 and the message Theme changed. Reload before saving. Reload the studio and make the change again.

Keep Studio changes in your source

A Studio change exists only in Basker. The next ZIP upload replaces the complete bundle, so the upload removes Studio changes that are not in your local files.

Before you upload again, get the saved files:

  • Click Download ZIP on the theme to download the draft bundle.
  • In Block Studio, click Download saved ZIP after a save.

Copy the changed files into your source, then run basker theme check and upload.

Themes connected to GitHub

When the theme is connected to GitHub, a Studio save also writes to the repository. Basker does not change the connected branch.

  1. Basker compares the saved draft with the files of the connected branch.
  2. Basker commits all differences on top of the last synced commit, with the message feat(theme): update <file path> in Studio.
  3. Basker creates a new branch for the commit: basker-studio/<theme ID>-<first 12 characters of the commit SHA>.
  4. Basker saves the new draft revision of the theme.

The studio shows Committed to with a link to the commit. Each save creates a new branch. The commit has all Studio changes since the last sync, not only the last change.

To keep the change, merge the basker-studio/... branch into the connected branch. The push starts a sync. If a sync from the connected branch runs before you merge, the sync replaces the Studio draft. For a compiled theme, copy the change into the source files before the next build. The next build output replaces it.

A Studio save on a connected theme has these conditions:

MessageCauseFix
GitHub connection must be active and owned by this editor before savingAnother person connected the theme, or the last sync failed.Ask that person to save, or click Change source to take over the connection. Fix the sync first.
GitHub branch changed. Sync and reload before saving.The connected branch has a commit that Basker has not synced.Click Sync now on the theme, then reload the studio.
The connected GitHub branch changed during save. Reload before trying again.A push arrived during the save.Reload the studio and save again.
Grant the Basker GitHub App Contents: Read and write permission, then retry the Studio saveThe GitHub App can read the repository but cannot write to it.Give the App write access to repository contents on GitHub.
The saved draft has no changes against the connected GitHub branchThe draft and the connected branch have the same files.No action.

On this page