lazee / premonition

Premonition is a Jekyll extension that makes it possible to add block-styled content to your site. Like summaries, notes, hints or warnings.
https://lazee.github.io/premonition-demo/
MIT License
51 stars 12 forks source link

Documentation specifies custom types as an array, instead of hash #9

Closed benfairless closed 4 years ago

benfairless commented 5 years ago

In the README.md the following snippet is used in Configuration > Adding custom types:

premonition:
  types:
    - id: custombox
      meta:
        fa-icon: fa-exclamation-circle
    - id: advanced
      template: 'Liquid template goes here'
      default_title: 'MY BLOCK'
      meta:
        fa-icon: fa-exclamation-triangle

This results in a Ruby error (LoadError: types must be a hash).

Instead the following works:

premonition:
  types:
    custombox:
      meta:
        fa-icon: fa-exclamation-circle
    advanced:
      template: 'Liquid template goes here'
      default_title: 'MY BLOCK'
      meta:
        fa-icon: fa-exclamation-triangle

I'd suggest the documentation is updated. If you are busy I am happy to do it for you.

lazee commented 5 years ago

Hi @benfairless. I'll test it and update the doc.

Thank you.