diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 083d8231..9c6a4e42 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -129,6 +129,7 @@ Call to action | ------------- | ----------------------------------------------------------------------------------------------------------------- | | `images` | **Required.** A regex string to match image names. | | `aspectRatio` | **Optional.** The aspect ratio for the carousel. Either `16-9`, `21-9` or `32-9`. It is set to `16-9` by default. | +| `interval` | **Optional.** The interval for the auto-scrooling, specified in milliseconds. Defaults to `2000` (2s) | **Example 1:** 16:9 aspect ratio and verbose list of images @@ -142,10 +143,10 @@ Call to action **Example 2:** 21:9 aspect ratio and regex-ed list of images ```md -{{}} +{{}} ``` -{{< carousel images="gallery/*" aspectRatio="21-9" >}} +{{< carousel images="gallery/*" aspectRatio="21-9" interval="2500" >}}


diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 928ace96..c7426564 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -2,6 +2,7 @@ {{ $id := delimit (slice "gallery" $time) "-" }} {{ $aspect := default "16-9" (.Get "aspectRatio") }} {{ $images := .Page.Resources.Match (.Get "images") }} +{{ $interval := default "2000" (.Get "interval") }}