Wiredcraft / jekyllpro-cms

A lightweight CMS for Jekyll websites.
http://jekyllpro.com/#cms
MIT License
7 stars 2 forks source link

Additional settings for schemas #56

Open hunvreus opened 7 years ago

hunvreus commented 7 years ago

We need to add a few more settings for schemas;

JuhaS commented 7 years ago

For Default extension and Description we'd need to add new root-level fields to the schema:

Proposal (see 2nd and 3rd fields that are new):

{ 
  "title": "Pages",
  "description": "The pages for the website",
  "extension": "md",
  "jekyll": {
    "type": "content",
    "id": "posts"
  },
  "JSONSchema": {
    "type": "object",
    "required": [
      "body"
    ],
    "properties": {
      "layout": {
        "type": "string",
        "title": "Layout"
      },
      "title": {
        "type": "string",
        "title": "Title"
      },
      "permalink": {
        "type": "string",
        "title": "Permalink"
      },
      "body": {
        "type": "string",
        "title": "Body"
      }
    }
  },
  "uiSchema": {
    "body": {
      "ui:widget": "customCodeMirror"      
    }
  }
}

We would then read this on the frontend and:

If that's ok I can create separate implementation issue for that.

About the Collection/Singleton we can discuss in #55 about that.