Documentation for new Koenig Image Gallery?

I just ran one of the themes (Laminim) through gscan, and it threw “must fix” warnings because my theme lacked support for the css classes .kg-gallery-container, .kg-gallery-row, and .kg-gallery-image.

Looks like an image gallery is coming to the Koenig editor in Ghost v2.1.0!

I hadn’t heard anything about this from the theme developers mailing list, and I can’t find any documentation about what the expected behaviour of the gallery component will be. The only thing I found to confirm this is that styles for a gallery component were recently added to Casper.

Where would I find documentation about the new image gallery for theme developers?

I already have a basic image gallery in my theme, but I want to make sure the markup is compatible.

1 Like

@curiositry docs are here Ghost Handlebars Themes - Building a custom Ghost theme - Docs, sorry for the gscan confusion caused by a last-minute delay on the release

1 Like

For me that link doesn’t send to Gallery Card. But this does:

1 Like

Thanks, no idea what went wrong with the copy/paste there! :ghost:

I find the Gallery a little weird that it splits the images into rows. That kinda puts a limit on devs to use the same structure. Why not simply display the list of .kg-gallery-image ? For example I have 7 images and that is split into 3 rows. 3 images first row and 2 images next 2 rows. Pretty strange. That forces me to do a masonry type of gallery. What do you think?

1 Like

I’m a little lost, does Casper already implement the gallery function? I’m not finding it, just the individual images like always.

@kevin Thanks!

The implementation in Casper seemed pretty robust, so I used that with a few tweaks (making the gallery support the same width options as normal images, etc). My only complaint is that it needs JS to work…