Skip to main content
  1. Snippits & Exemplars/
  2. WolfspyreLabs Exemplars/
  3. WolfspyreLabs Shortcodes/

Propertylist

🐺 propertylist format a datafile all fancy-like.

The property list shortcode creates a custom HTML description list that can be used to display properties or variables and general dependent information. The shortcode requires a data file in data/properties/, e.g. data/properties/demo.yaml, where the filename must be passed to the name attribute of the property list shortcode.

{{< propertylist name=propertylist-shortcode-demo order=asc  showAnchor=true >}}

The supported attributes can be taken from the following example:

---
properties:
  - name: prop1
    type: string
    description: Dummy description of the prop1 string property.
    required: true

  - name: prop2
    type: int
    defaultValue: 10
    description:
      en: Another description for the integer property called prop2.
    required: false
    tags:
      en:
        - tag1
        - tag2

  - name: prop3
    type: bool
    defaultValue: false
    description: |
      A `bool` property with a complex multiline description and embedded Markdown:

      - List item 1
      - List item 2

      More description how to use this property.      
    required: false

  - name: a-prop
    type: string
    description: Property to demonstrate sorting.
    required: true
a-proprequiredstring
Property to demonstrate sorting.
Default: none
prop1requiredstring
Dummy description of the prop1 string property.
Default: none
prop2optionalinttag1tag2
Another description for the integer property called prop2.
Default: 10
prop3optionalbool

A bool property with a complex multiline description and embedded Markdown:

  • List item 1
  • List item 2

More description how to use this property.

Default: false