Blockstudio
General

Settings

Blockstudio includes a powerful settings API, that allows setting options via a blockstudio.json file inside your theme folder and/or filters. Additionally, allowed users are able to change the settings visually inside the admin area.

Via JSON

If a blockstudio.json file is present inside your theme folder, it will be used to set the default options for the current site. A JSON schema is available to validate the file and help with autocompletion when used in an IDE.

The following properties are available:

blockstudio.json
{
  "$schema": "https://blockstudio.dev/schema/blockstudio",
  "users": {
    "ids": [],
    "roles": []
  },
  "assets": {
    "enqueue": true,
    "minify": {
      "css": false,
      "js": false
    },
    "process": {
      "scss": false
    }
  },
  "editor": {
    "formatOnSave": false,
    "assets": [],
    "markup": false
  },
  "library": false,
  "blockEditor": {
    "disableLoading": false,
    "cssClasses": [],
    "cssVariables": []
  }
}

Via Filters

Alternatively you can use the blockstudio/settings/${setting} filter to set options via PHP for more flexibility.

functions.php
add_filter('blockstudio/settings/assets/enqueue', '__return_false');
add_filter('blockstudio/settings/editor/formatOnSave', '__return_true');
add_filter('blockstudio/settings/library', '__return_true');

Options set via the blockstudio/settings/${setting} filter will override the ones set via the blockstudio.json file. Both methods can be used together.

Available Settings

users

OptionTypeDefaultDescription
idsarray[]User IDs with editor access
rolesarray[]User roles with editor access

assets

OptionTypeDefaultDescription
enqueuebooleantrueAuto-enqueue block assets
minify.cssbooleanfalseMinify CSS output
minify.jsbooleanfalseMinify JS output
process.scssbooleanfalseProcess SCSS files

editor

OptionTypeDefaultDescription
formatOnSavebooleanfalseFormat block.json on save
assetsarray[]Additional assets to load in editor
markupbooleanfalseEnable markup editing

library

TypeDefaultDescription
booleanfalseEnable the block library

tailwind

OptionTypeDefaultDescription
enabledbooleanfalseEnable Tailwind CSS compilation
configstring""Tailwind v4 CSS-first configuration

blockEditor

OptionTypeDefaultDescription
disableLoadingbooleanfalseDisable block loading in editor
cssClassesarray[]Stylesheet URLs to extract CSS classes from for the classes field autocomplete
cssVariablesarray[]Stylesheet URLs to extract CSS variables from for the code field autocomplete
Guide: Building a Block LibrarySee blockstudio.json in context: the complete setup for a Tailwind-powered block library.

On this page