Geekdocs
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Properties

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=demo >}}

The supported attributes can be taken from the following example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
properties:
  prop1:
    type: string
    description: Dummy description of the prop1 string property.
    required: true

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

  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

Example

prop1 required string
Dummy description of the prop1 string property.
Default: none
prop2 optional int tag1 tag2
Another description for the integer property called prop2.
Default: 10
prop3 optional bool

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