Skip to content

YAML generators

Lukasz Sielski edited this page Apr 21, 2016 · 3 revisions

Fields in bold (or their combination, if few) are unique keys for type.

Language

  • code - string
  • enabled - boolean
  • default - boolean
Language:
 -
   code: en
   enabled: true
   default: true
 -
   code: pl
   enabled: true

Role

  • name - string
  • label - string
  • acl - hashmap
Role:
 -
   name: member
   label: Member
   acl:
     /: [get]

User

  • email - string
  • name - string
  • roles - array of string (Role)
  • password - string
  • image - string
User:
 -
   email: john.doe@example.com
   name: John Doe
   password: unecrytpedDefaultPa$$word
   roles:
    - member
   image: https://pbs.twimg.com/profile_images/679075823907831809/bJjXiFwm.jpg

TaxonomyType

  • name - string
  • label - string
TaxonomyType:
 -
   name: tag
   label: Tag

Taxonomy

  • name - string
  • type - string
  • label - string
-
  name: x-wing
  label: X-Wing
  type: tag

Template

  • name - string
  • path - string
  • thumb - string
  • selectable - string
  • props - hashmap
  • type - string

Selectable template

One you can use to create new page. Uses selectable flag and thumb for choice popup.

Template:
 -
   name: blog template
   path: ~/core/blogpost
   thumb: /img/core/templates/blog.jpg
   selectable: true

Block template

Template:
 -
   name: Hero
   path: ~/core/block/hero
   type: block

Template with properties

Both selectable and block tempaltes benefit from usage of properties. You can define available properites using props field:

Template:
 -
   name: Hero
   path: ~/core/block/hero
   type: block
   props:
     theme: string

Content

  • type - string
  • route - string
  • template - string
  • layout - object
  • javascripts - array
  • stylesheets - array
  • taxonomy - hashmap
  • state - string
  • props - hashmap

Shared content

Content:
 -
   type: shared
   route: contact-information
   template: ~/core/partials/block/contact-information
   layout:
     type: Fields
     left: |
       # Riverside HQ

       Enigma Marketing Service\n
       The New Boathouse\n
       Mill Lane\n
       Maidenhead\n
       [SL6 0AA](https://goo.gl/maps/fgvMiQdbdHy)
     right: |
       # Contact Us
       [hello@enigma-marketing.co.uk](mailto:hello@enigma-marketing.co.uk)\n
       [+44 (0) 1628 50 00 58](tel:+441628500058)\n
       [@EnigmaMarketing](https://twitter.com/EnigmaMarketing)
Clone this wiki locally