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.

Usage

{{< propertylist name=demo (sort=name) (order=[asc|desc]) >}}

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
30
31
32
33
34
---
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

Attributes

class optional list
List of space-separated CSS class names to apply.
Default: none
href optional string
The URL to use as target of the button.
Default: none
relref optional string
Executes the relref Hugo function to resolve the relative permalink of the specified page. The result is set as the target of the button.
Default: none
size optional string
Preset of different button sizes. Supported values are regular|large.
Default: none

Example

a-prop required string
Property to demonstrate sorting.
Default: none
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