Giter Site home page Giter Site logo

statamic-blueprint-validation's Introduction

A JSON Schema for Statamic Blueprint YAML files

Introduction

The schema supports all fieldtypes, their options and the validation rules.

Example

Setup

PhpStorm | IntelliJ

  1. Open PhpStorm and switch to File > Preferences > Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings
  2. Add a new entry with the following options
    • Schema file or URL: https://raw.githubusercontent.com/Konafets/statamic-blueprint-validation/main/statamic.blueprint.schema.json
    • Directory: resources/blueprints

Example

Sublime

TODO

Visual Studio Code

TODO

Credits

  • Thanks Jonas for providing a test blueprint

statamic-blueprint-validation's People

Contributors

konafets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

statamic-blueprint-validation's Issues

Support for tabs

In Statamic 4, blueprints were updated a little. PHPStorm users (and probably other editors using this schema) are now seeing validation errors.

CleanShot 2023-07-24 at 14 58 18

Blueprints can have a top level tabs key. The tabs are keyed by handle.

Each tab has multiple sections, which do not have named keys.

title: My Blueprint
tabs:
  tab_one:
    display: Tab One
    sections:
      -
        display: My Section # optional
        instructions: Some instructions #optional
        fields: [] # Same as existing fields.
      -
        fields: []

The top level sections as used on Statamic 3.x is still valid.

If I can help, let me know. But I'm sure you can update this more easily than me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.