Bootstrap Image Grid Shortcode

Shortcode to display images in grid layout.

Donate

Become a backer or sponsor to support our work.

Sponsors

Syntax

1{{< bs/img-grid "data" >}}

Parameters

data

PositionNameTypeRequiredDefaultSinceExample
#0datastring---

The name of data.

Data File

The data files should be put into /data or page’s folder.

Image Properties

src

NameContextTypeRequiredDefaultSinceExample
src-string---

The image’s source URL or image resources name.

title

NameContextTypeRequiredDefaultSinceExample
title-string---

The image’s alternative text and caption.

url

NameContextTypeRequiredDefaultSinceExample
url-string----

The URL of the element.

Example

data/img-grid-examples.yaml
1- src: https://avatars.githubusercontent.com/u/128204519?s=200&v=4&width=200&height=200
2  title: HugoMods
3
4- src: https://avatars.githubusercontent.com/u/127904984?s=200&v=4&width=200&height=200
5  title: HB Framework
6
7- src: https://avatars.githubusercontent.com/u/17720932?s=200&v=4&width=200&height=200
8  title: Razon Yang
Source
1{{< bs/img-grid "img-grid-examples" >}}
Result
HugoMods
HugoMods
HB Framework
HB Framework
Razon Yang
Razon Yang