Solitude Docs
特色页面

图库

在 MDX 页面中组合图片。

创建 src/content/pages/gallery.mdx,写入标题与图库:

---
title: Gallery
---
<Gallery columns={2}>
<GalleryItem src="/img/demo/cover-getting-started-v2.webp" alt="Create" />
<GalleryItem src="/img/demo/cover-pagination-v2.webp" alt="Collect" />
</Gallery>

Gallery 设置列数,GalleryItem 设置图片和替代文本,GalleryGroup 创建图库入口。添加 /gallery/ 菜单后即可访问。

相关文档

媒体组件