From c39eee4368a915584c8abe4627f036e6c0914964 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 11 Jul 2022 20:45:55 +0200 Subject: [PATCH] docs: normalize shortcode documentation (#454) --- exampleSite/content/en/shortcodes/hints.md | 14 +++++++------- exampleSite/content/en/shortcodes/icons.md | 2 +- .../content/en/shortcodes/images/_index.md | 18 +++++++++--------- exampleSite/content/en/shortcodes/includes.md | 2 +- exampleSite/content/en/shortcodes/toc.md | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/exampleSite/content/en/shortcodes/hints.md b/exampleSite/content/en/shortcodes/hints.md index d437232..c3a0497 100644 --- a/exampleSite/content/en/shortcodes/hints.md +++ b/exampleSite/content/en/shortcodes/hints.md @@ -4,15 +4,15 @@ title: Hints Hint shortcode can be used as hint/alerts/notification block. -Attributes: +## Attributes -| Name | Usage | Default | -| ---------------- | --------------------------------------------------------------------------------- | --------------------- | -| type | color types to choose from | note | -| icon (optional) | custom icon to use | undefined (type name) | -| title (optional) | custom icon to use, need to be an icon from an [SVG sprite](/features/icon-sets/) | undefined (type name) | +| Name | Description | default | +| ---------------- | -------------------------------------------------------------------------------- | --------- | +| type | hint type | note | +| icon (optional) | custom icon to use,need to be an icon from an [SVG sprite](/features/icon-sets/) | undefined | +| title (optional) | hint title | undefined | -Syntax: +## Usage ```tpl diff --git a/exampleSite/content/en/shortcodes/icons.md b/exampleSite/content/en/shortcodes/icons.md index 2e4b6cb..95c16d6 100644 --- a/exampleSite/content/en/shortcodes/icons.md +++ b/exampleSite/content/en/shortcodes/icons.md @@ -10,7 +10,7 @@ Simple shortcode to include icons from SVG sprites outside of menus. ``` -**Example:** +## Usage | Result | Usage | | -------------------------- | -------------------------------- | diff --git a/exampleSite/content/en/shortcodes/images/_index.md b/exampleSite/content/en/shortcodes/images/_index.md index b8a58d9..29d06a0 100644 --- a/exampleSite/content/en/shortcodes/images/_index.md +++ b/exampleSite/content/en/shortcodes/images/_index.md @@ -41,16 +41,16 @@ resources: If you need more flexibility for your embedded images, you could use the `img` shortcode. It is using Hugo's [page resources](https://gohugo.io/content-management/page-resources/) and supports lazy loading of your images. -**Attributes:** +## Attributes -| Name | Usage | Default | -| ------------- | ------------------------------------------------------------------------------------------------------------- | ----------------- | -| name (string) | Name of the image resource defined in your front matter. | empty | -| alt (string) | Description for displayed image. | resource `.Title` | -| size (string) | Thumbnail size (tiny\|small\|medium\|large). | empty | -| lazy (bool) | Enable or disable image lazy loading. Can be controlled globally by site parameter `geekdocImageLazyLoading`. | true | +| Name | Description | default | +| ---- | ------------------------------------------------------- | ----------------- | +| name | name of the image resource defined in your front matter | empty | +| alt | description for displayed image | resource `.Title` | +| size | Thumbnail size (profile\|tiny\|small\|medium\|large) | empty | +| lazy | enable or disable image lazy loading | true | -**Example:** +## Usage Define your resources in the page front matter, custom parameter `params.credits` is optional. @@ -71,7 +71,7 @@ resources: -**Demo:** +## Example diff --git a/exampleSite/content/en/shortcodes/includes.md b/exampleSite/content/en/shortcodes/includes.md index 01d6ad9..8294687 100644 --- a/exampleSite/content/en/shortcodes/includes.md +++ b/exampleSite/content/en/shortcodes/includes.md @@ -14,7 +14,7 @@ Include shortcode can include files of different types. By specifying a language Attributes: -| Name | Usage | Default | +| Name | Description | Default | | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | | file | path to the included file relative to the Hugo root | undefined | | language | language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages) | undefined | diff --git a/exampleSite/content/en/shortcodes/toc.md b/exampleSite/content/en/shortcodes/toc.md index 77259c7..c1529a9 100644 --- a/exampleSite/content/en/shortcodes/toc.md +++ b/exampleSite/content/en/shortcodes/toc.md @@ -6,11 +6,11 @@ Simple wrapper to generate a page Table of Content from a shortcode. **Attributes:** -| Name | Usage | Default | +| Name | Description | Default | | ------ | -------------------------- | ------------------------------------------------------------- | | format | format of the returned ToC | html | -**Syntax:** +**Usage:** ```tpl