Skip to content

Object Format

Bradley Huffaker edited this page Oct 4, 2022 · 1 revision

Objects in the catalog can be stored as a JSON file, Markdown File, or a directory with README markdown file.

JSON file format ( sources//.json )

A direct representation of the data as JSON.

{
   "id":"hidden",
   "name":"Hidden",
   "content":"This is the hidden example object.\nWithout any special formating"
}

Markdown file format ( sources//.md )

The markdown represents the object as a set of blocks. The first block is always the metadata block which contains a partial representation in JSON. Additional blocks will be stored as individual fields based on the string following the blocks marking character. So ~~~dataTables will be stored in the field dataTables. A format can be added with a format=YAML, otherwise they will be assumed to be markdown. The ===content block will be added onto the bottom of the object's detail page.

The markdown module that we are currently using for recipes does not parse markdown the same way that github does.

  • You must use ~~~ not ``` for code blocks
  • There must be white space above and below the first and last ~~~
    • will not work
    something above
    ~~~
    this block will not be parsed correctly
    ~~~
    something below
    
    • this will work
    
    ~~~
    this block will be parsed correctly
    ~~~
    
    
  • Tables also require white space above and below.
  • use dash (-) instead of special characters (•)
 • wrong 
 - right
    - right also 

Directory ( sources///Readme.md )

The Readme is stin