docs: use a propertylist to document shortcode attributes (#732)
This commit is contained in:
parent
76ef8f147c
commit
83469c437f
24 changed files with 256 additions and 94 deletions
19
exampleSite/data/properties/shortcode-buttons.yaml
Normal file
19
exampleSite/data/properties/shortcode-buttons.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
properties:
|
||||
- name: href
|
||||
type: string
|
||||
description: The URL to use as target of the button.
|
||||
required: false
|
||||
- name: relref
|
||||
type: string
|
||||
description: Executes the [relref](https://gohugo.io/functions/urls/relref/) Hugo function to resolve the relative permalink of the specified page. The result is set as the target of the button.
|
||||
required: false
|
||||
- name: class
|
||||
type: list
|
||||
description: List of space-separated CSS class names to apply.
|
||||
required: false
|
||||
- name: size
|
||||
type: string
|
||||
description: Preset of different button sizes. Supported values are `regular|large`.
|
||||
required: false
|
||||
devaultValue: regular
|
7
exampleSite/data/properties/shortcode-columns.yaml
Normal file
7
exampleSite/data/properties/shortcode-columns.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
properties:
|
||||
- name: size
|
||||
type: string
|
||||
description: Preset of different sizes for the _first_ column. Supported values are `small|regular|large`.
|
||||
required: false
|
||||
defaultValue: regular
|
15
exampleSite/data/properties/shortcode-hints.yaml
Normal file
15
exampleSite/data/properties/shortcode-hints.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
properties:
|
||||
- name: type
|
||||
type: string
|
||||
description: Type of the hint. Supported values are `note|tip|important|caution|warning`.
|
||||
required: false
|
||||
defaultValue: note
|
||||
- name: icon
|
||||
type: string
|
||||
description: Icon to use. The value need to be an icon from an [SVG sprite](/features/icon-sets/).
|
||||
required: false
|
||||
- name: title
|
||||
type: string
|
||||
description: Title text of the hint.
|
||||
required: false
|
19
exampleSite/data/properties/shortcode-images.yaml
Normal file
19
exampleSite/data/properties/shortcode-images.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
properties:
|
||||
- name: name
|
||||
type: string
|
||||
description: Mame of the image resource defined in page front matter.
|
||||
required: true
|
||||
- name: alt
|
||||
type: string
|
||||
description: Description text for the image.
|
||||
required: false
|
||||
- name: size
|
||||
type: string
|
||||
description: Thumbnail size. Supported values are `origin|profile|tiny|small|medium|large`.
|
||||
required: false
|
||||
- name: lazy
|
||||
type: bool
|
||||
description: Enable/disable lazy loading for the image.
|
||||
required: false
|
||||
defaultValue: true
|
19
exampleSite/data/properties/shortcode-includes.yaml
Normal file
19
exampleSite/data/properties/shortcode-includes.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
properties:
|
||||
- name: file
|
||||
type: string
|
||||
description: Path of the file (relative to the Hugo root) to include.
|
||||
required: true
|
||||
- name: language
|
||||
type: string
|
||||
description: Language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages).
|
||||
required: false
|
||||
- name: type
|
||||
type: string
|
||||
description: Special include type. Supported values are `html|page`. If not set the included file is rendered as markdown.
|
||||
required: false
|
||||
- name: options
|
||||
type: bool
|
||||
description: highlighting [options](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode).
|
||||
required: false
|
||||
defaultValue: linenos=table
|
6
exampleSite/data/properties/shortcode-katex.yaml
Normal file
6
exampleSite/data/properties/shortcode-katex.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
properties:
|
||||
- name: class
|
||||
type: list
|
||||
description: List of space-separated CSS class names to apply.
|
||||
required: false
|
6
exampleSite/data/properties/shortcode-mermaid.yaml
Normal file
6
exampleSite/data/properties/shortcode-mermaid.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
properties:
|
||||
- name: class
|
||||
type: list
|
||||
description: List of space-separated CSS class names to apply.
|
||||
required: false
|
15
exampleSite/data/properties/shortcode-progress.yaml
Normal file
15
exampleSite/data/properties/shortcode-progress.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
properties:
|
||||
- name: value
|
||||
type: integer
|
||||
description: Progress value.
|
||||
required: false
|
||||
defaultValue: 0
|
||||
- name: icon
|
||||
type: string
|
||||
description: Icon to use. The value need to be an icon from an [SVG sprite](/features/icon-sets/).
|
||||
required: false
|
||||
- name: title
|
||||
type: string
|
||||
description: Title text of the progress bar.
|
||||
required: false
|
15
exampleSite/data/properties/shortcode-propertylist.yaml
Normal file
15
exampleSite/data/properties/shortcode-propertylist.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
properties:
|
||||
- name: name
|
||||
type: string
|
||||
description: Name of the file from the `data/properties/` directory.
|
||||
required: true
|
||||
- name: sort
|
||||
type: string
|
||||
description: Field name to use for sorting.
|
||||
required: false
|
||||
- name: order
|
||||
type: string
|
||||
description: Sort order, only applied if `sort` is set. Supported values are `asc|desc`.
|
||||
required: false
|
||||
defaultValue: asc
|
10
exampleSite/data/properties/shortcode-toc.yaml
Normal file
10
exampleSite/data/properties/shortcode-toc.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
properties:
|
||||
- name: format
|
||||
type: string
|
||||
description: |
|
||||
Format of the returned ToC. The `html` format creates an HTML wrapper to enable the `geekdocToC` parameter that limits
|
||||
the maximum ToC level to be displayed. This variant also automatically inserts a horizontal line after the ToC. The `raw` format
|
||||
returns the unformatted ToC, the parameter `geekdocToC` does not work in this mode. Supported values are `html|raw`.
|
||||
required: false
|
||||
defaultValue: html
|
Loading…
Add table
Add a link
Reference in a new issue