Example Lightbox Document

Chilmark

Here is a simple image with a description. This also overrides the description position and places it to the left of the image.

Image

Beach in Chilmark

Elsewhere

The below demonstrates placing more than one image in a gallery. Note the usage of the layout-ncol which arranges the images on the page side by date. Adding the group attribute to the markdown images places the images in a gallery grouped together based upon the group name provided.

Image

Aquinnah

Image

Oak Bluffs

Image

Vineyard lighthouse

With computation code chunks

Options for lightbox can be passed using chunk options.

plot(1:10, rnorm(10))

Image

Simple demo R plot

plot(cars)

Image

Plot about cars data

It is possible to create several plots, and group them in a lightbox gallery. Use list in YAML for options when you have several plots, on per plot.

plot(mtcars)

Image

Caption for first plot

plot(cars)

Image

Caption for second plot

When lightbox: auto in main YAML config, you can opt-out lightbox on a plot by setting lightbox: false

plot(mtcars)

Image

mtcars

Credits

The images in this example were used under the Unsplash license, view originals below: