Blot

Dashboard controls

Blot turns certain locals in your template’s package.json into configurable controls on the dashboard. Naming conventions determine which loader populates a control and how it is rendered. Using these conventions automatically renders point-and-click dashboard controls without extra code, making it easier for your template to be configured.

Color pickers

Any local ending with _color becomes a color input. The template editor collects these keys and supplies labels based on the key name.

{
  "locals": {
    "background_color": "#ffffff",
    "link_color": "#3366ff"
  }
}

Font selectors

Keys named font or ending with _font (except syntax_highlighter_font) are exposed through the font picker in the template editor. The helper builds picker options and labels automatically.

{
  "locals": {
    "font": {
      "family": "Inter",
      "weight": 400
    },
    "heading_font": {
      "family": "Source Serif Pro",
      "weight": 600
    }
  }
}

Uploads

Locals ending with _url become upload controls. The loader uses the key name minus the suffix for the dashboard label.

{
  "locals": {
    "logo_url": "",
    "favicon_url": ""
  }
}

Folder

The local folder_root becomes a folder picker: a field which suggests the directories in the blog’s folder. Its value is a path such as /Posts; an empty value means /Posts. The dashboard saves it with a leading slash and no trailing slash, and refuses a path containing ... If the folder doesn’t exist, the dashboard shows an error beside the control but keeps the value, since the folder may be created later. Only the exact name folder_root gets the control, so a local such as demo_folder stays a plain value. A {{#folder}} tag that lists this folder is coming; for now the control only stores the path.

{
  "locals": {
    "folder_root": "/Posts"
  }
}

Images

Any top-level local whose name ends in _image becomes an image control. Declare it with an empty object. Replacing or explicitly deleting an image removes its old files once no other template references them.

{
  "locals": {
    "profile_image": {}
  }
}

After upload, the value contains the original’s oriented dimensions and four derivatives. An optional rectangular crop applies to the original and its derivatives. small, medium, and large fit proportionally within 160, 640, and 1200 pixels without upscaling. square is a 160-pixel entropy-based crop of the selected image area. Animated images use their first frame.

profile_image works a little differently so it can be edited later. Its original is the whole photo shrunk to at most 2000 pixels on its longer side, and the crop (crop: x, y, width, height, as fractions of the original) only applies to the derivatives. The value also has a mask (square, circle, rounded-square, squircle, blob, pebble, cloud or arch) and every derivative is transparent outside that shape.

{
  "url": "…", "width": 1200, "height": 800,
  "thumbnails": {
    "small": { "url": "…", "width": 160, "height": 107 },
    "medium": { "url": "…", "width": 640, "height": 427 },
    "large": { "url": "…", "width": 1200, "height": 800 },
    "square": { "url": "…", "width": 160, "height": 160 }
  }
}
<img src="{{{profile_image.thumbnails.small.url}}}" width="{{profile_image.thumbnails.small.width}}" height="{{profile_image.thumbnails.small.height}}" alt="Profile">

Keys containing navigation_ or _navigation are grouped together. Custom labels are defined for common navigation fields.

{
  "locals": {
    "navigation_alignment": "left",
    "sticky_navigation": false,
    "footer_navigation": true
  }
}

Date controls

If you define date_display, the template editor renders a selector of example formats using the blog’s timezone. Adding hide_dates (a boolean) shows or hides the dates toggle alongside the format dropdown.

{
  "locals": {
    "date_display": "MMMM D, Y",
    "hide_dates": false
  }
}

Syntax highlighting

Including a syntax_highlighter object enables theme selection. The same loader optionally reads syntax_highlighter_font to let authors choose a typeface for code blocks.

{
  "locals": {
    "syntax_highlighter": {
      "id": "monokai"
    },
    "syntax_highlighter_font": {
      "family": "Fira Code",
      "weight": 400
    }
  }
}

Booleans, ranges and selects

The generic control builder converts remaining locals into switches, sliders and select menus:

  • Boolean values become toggles
  • When a key has a matching key_range array, it renders as a range input with optional min/max defaults.
  • When a key has a matching key_options array, it renders as a select menu.
  • page_size is always treated as a range input unless the template also defines thumbnails_per_row, in which case the loader hides page_size to avoid conflicting pagination controls.
  • Navigation keys (navigation_* or *_navigation) are excluded here because they are grouped by the navigation loader.
{
  "locals": {
    "show_author": true,
    "spacing": 12,
    "spacing_range": [8, 32],
    "theme": "serif",
    "theme_options": ["serif", "sans"],
    "page_size": 10,
    "thumbnails_per_row": 4
  }
}