feat: add option to sort items in properties shortcode (#527)
BREAKING CHANGE: To enable sorting of elements in the `properties` shortcode, it was necessary to change the structure of the properties file. Due to this change, the `properties` object now requires a list of maps instead of a map. A [sample file](https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/main/exampleSite/data/properties/demo.yaml) can be found in the repository.
This commit is contained in:
parent
73c5f6a6b2
commit
128a55e974
3 changed files with 38 additions and 13 deletions
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
properties:
|
||||
prop1:
|
||||
- name: prop1
|
||||
type: string
|
||||
description: Dummy description of the prop1 string property.
|
||||
required: true
|
||||
|
||||
prop2:
|
||||
- name: prop2
|
||||
type: int
|
||||
defaultValue: 10
|
||||
description:
|
||||
|
@ -16,7 +16,7 @@ properties:
|
|||
- tag1
|
||||
- tag2
|
||||
|
||||
prop3:
|
||||
- name: prop3
|
||||
type: bool
|
||||
defaultValue: false
|
||||
description: |
|
||||
|
@ -27,3 +27,8 @@ properties:
|
|||
|
||||
More description how to use this property.
|
||||
required: false
|
||||
|
||||
- name: a-prop
|
||||
type: string
|
||||
description: Property to demonstrate sorting.
|
||||
required: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue