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

Property list

🐺 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-propbarquiredstring
Property to demonstrate sorting.
Bark: none
prop1barquiredstring
Dummy description of the prop1 string property.
Bark: none
prop2barktionalint
Bark: 10
prop3barktionalbool

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

  • List item 1
  • List item 2

More description how to use this property.

Bark: false